Ling-3.0-flash-GGUF

Canonical bailingmoe3-arch GGUF of inclusionAI/Ling-3.0-flash โ€” a 124B-parameter hybrid-linear MoE (~5B active; 512 experts/8 used; 42 layers = 35 KDA recurrent + 7 gated-MLA attention; one NextN/MTP head) โ€” converted and quantized on Apple Silicon, with full provenance for independent reproduction.

File Quant Size Arch
Ling-3.0-flash-bailingmoe3-IQ4_XS.gguf IQ4_XS (~4.3 bpw) 64 GB bailingmoe3 (canonical)

This file loads without shims or overrides in the runtime linked below (ssm_a is exp'd at conversion, kda.gate_lower_bound is in the file).

Why this file exists

The HuggingFace checkpoint is bf16 (~240 GB) and uses model_type: bailing_hybrid, which upstream llama.cpp does not support. This repo publishes a canonical bailingmoe3-arch GGUF so anyone can run the model on Apple Silicon without re-deriving the (non-trivial) conversion.

Repositories โ€” everything needed to reproduce

What Where
Runtime (this GGUF's home) ljubomirj/Ling-3.0-flash-llama.cpp โ€” standalone llama.cpp fork with BailingMoE3 support (provenance + research summary in README)
Living branch the repo was split from ljubomirj/llama.cpp branch atomic-bailingmoe3 โ€” same code, keeps advancing. Built on top of the original AtomicBot-ai/atomic-llama-cpp-turboquant (Atomic llama.cpp, feat/bailingmoe3) โ€” huge thanks to the Atomic team for the bailingmoe3 architecture support this is derived from
Upstream llama.cpp ggml-org/llama.cpp
Upstream BailingMoE3 support (PR #26608) ggml-org/llama.cpp#26608 โ€” aetherbird's converter (conversion/bailingmoe3.py) used for this file
Original checkpoint inclusionAI/Ling-3.0-flash (bf16, ~240 GB, 24 shards)
Early non-canonical GGUFs (legacy bailing-hybrid arch) aj9o9/Ling-3.0-flash-GGUF โ€” same model, older arch string; loads via the legacy shim in the runtime

Reproduce this file (from scratch)

Ingredients: the bf16 checkpoint, the PR-26608 converter, llama.cpp's quantizer.

# 1. Download the bf16 checkpoint (~240 GB)
huggingface-cli download inclusionAI/Ling-3.0-flash --local-dir $NV/inclusionAI-Ling-3.0-flash

# 2. Convert to f16 GGUF using the PR-26608 (aetherbird) converter
#    (conversion/bailingmoe3.py in the PR; registers BailingMoeV3ForCausalLM
#     -> model_arch bailingmoe3, exp's A_log, writes kda.safe_gate + lower_bound)
cd <aetherbird-llama.cpp>   # PR #26608
python3 -m convert_hf_to_gguf $NV/inclusionAI-Ling-3.0-flash \
  --outtype f16 --outfile $NV/Ling-3.0-flash-f16.gguf --split-max-size 40G

# 3. Quantize to IQ4_XS
llama-quantize $NV/Ling-3.0-flash-f16-00001-of-00007.gguf \
  $NV/Ling-3.0-flash-bailingmoe3-IQ4_XS.gguf IQ4_XS

Disk discipline: peak ~540 GiB (bf16 240 + f16 255 + IQ4_XS 64); delete the bf16 checkpoint after step 2 to stay within ~700 GiB.

Run it

git clone git@github.com:ljubomirj/Ling-3.0-flash-llama.cpp.git
cd Ling-3.0-flash-llama.cpp
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
  -DGGML_METAL=ON -DGGML_METAL_EMBED_LIBRARY=ON -DGGML_ACCELERATE=ON
cmake --build build --config Release --target llama-cli llama-server -j8

./build/bin/llama-cli -m Ling-3.0-flash-bailingmoe3-IQ4_XS.gguf \
  -ngl 99 -p "The capital of France is" -n 16

Measured performance (Apple M2 Max 96 GB, Metal)

llama-bench -m Ling-3.0-flash-bailingmoe3-IQ4_XS.gguf -ngl 99 -r 2:

Test t/s
pp2048 @ d0 301.5
pp2048 @ d29664 154.4
tg128 @ d0 35.0
tg128 @ d29664 24.3

Decode is memory-bandwidth-bound โ€” M2 Max ~400 GB/s ceiling. Roofline check: ~2.96 GB active bytes per token at 8/512 experts (only the selected experts are read; 97% of the file is MoE weights) โ†’ 400 GB/s รท 2.96 GB โ‰ˆ 135 t/s ceiling, and we measure 35 t/s โ€” only ~27% of the roofline. There is clearly a lot of scope for improvement here. Flash attention is enabled by default and mandatory at depth (fa=0 collapses to ~5 t/s @64K).

Verification / golden logits

The conversion was validated against an independent HF-bf16 golden reference (golden-hf-bf16.json: 16 steps, full logits, vocab 157,184), captured via a torch shim of fla-core's KDA kernels (triton is unavailable on macOS). The first-token distributions match within IQ4_XS noise (p(198): golden 0.296 vs this file 0.370); later divergence is near-tie argmax flips compounding through the recurrent state โ€” no graph bug. Details in the runtime repo's README.

License / provenance notes

Downloads last month
-
GGUF
Model size
127B params
Architecture
bailingmoe3
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for ljupco/Ling-3.0-flash-GGUF

Quantized
(24)
this model