← All guides

Can I Run Ling-3.1-flash Locally? (2026): Yes, on 200GB+

inclusionAI put Ling-3.1-flash on Hugging Face on 13 October 2026. It is a 560B mixture-of-experts model with 25B active parameters per token. We summed every GGUF file in bytes from the Hugging Face API, did the cache arithmetic from config.json, and checked llama.cpp, MLX and Ollama support. The short answer: you need about 200GB of total memory. No 128GB machine holds even the 1-bit llama.cpp file.

Bottom Line

  • Yes, but only with about 200GB of total memory. The smallest usable 2-bit GGUF is 159.06 GiB (IQ2_XXS). Q2_K is 204.12 GiB.
  • 128GB machines do not run it in llama.cpp. The 1-bit IQ1_S file is 122.01 GiB. That is over a 128GB Mac’s 107.52 GiB default Metal limit and over a DGX Spark’s 121.63 GiB total.
  • The 256GB Mac Studio M5 Ultra is the simplest box. It costs $9,499 (apple.com, 22 October 2026) and holds Q2_K with the full 262K context.
  • The 512GB Mac Studio cannot be bought yet. Apple’s store still says the option is “coming late October”. Q4_K_M (333.39 GiB) needs it.
  • On a PC, use a GPU plus 192-256GB of RAM. Put the always-active trunk on the GPU and the routed experts in system RAM.
  • The context is cheap. Only 9 of 72 layers keep a growing cache. The full 262,144-token window costs about 2.8 GiB.
  • llama.cpp supports it. Use build b11627 or newer. MLX has code support but no ready quant. Ollama has no library entry.

Ready to buy? See the tested hardware list with current prices.

What the Model Is

All figures come from the Ling-3.1-flash model card, its config.json and the Hugging Face API, read on 22 October 2026.

SpecValue
RepoinclusionAI/Ling-3.1-flash
Created on Hugging Face13 October 2026
Total parameters560B (card); 572,120,680,768 in the checkpoint, including the MTP layer
Active parameters25B per token (card)
Layers72: 63 Kimi Delta Attention (KDA, linear) + 9 gated MLA
Experts512 routed + 1 shared, 8 routed active; the first 4 layers are dense
Extra layer1 multi-token-prediction (MTP) layer for speculative decoding
Stored weightsFP8 (E4M3), 128 x 128 blocks
ContextCard: “1M-token”. config.json: 262,144
Architecture tagBailingMoeV3ForCausalLM, model_type bailing_hybrid
LicenseMIT

The card shows its benchmark results only as images. We quote no scores. The card’s run recipes target servers: SGLang on 8 x H200, or 4 x GB300.

The context claim does not match the config. The card says 1M tokens. config.json sets max_position_embeddings to 262,144 and rope_scaling to null. Both GGUF repos list 262,144. Plan for 262K.

Two-thirds of each token’s reads are fixed. Config.json gives 68 MoE layers with experts of 3 x 4,096 x 1,280 weights. Eight active experts in 68 layers is 8.56B weights. The other 16.4B of the 25B active weights are the trunk: attention, the shared expert, the dense layers and the output head. Every token reads all of it.

Every GGUF Size, in Bytes

We summed the split files in the Hugging Face file trees for bartowski/Ling-3.1-flash-GGUF and AtomicChat/Ling-3.1-flash-GGUF on 22 October 2026. “File bits/weight” is from bartowski’s card.

FileSourceBytesGiBFile bits/weight
IQ1_Sbartowski131,007,719,744122.011.83
IQ1_Mbartowski145,087,687,008135.122.03
AD-IQ1_SAtomicChat141,806,435,008132.07—
IQ2_XXSbartowski170,789,808,544159.062.39
AD-IQ2_XXSAtomicChat174,144,518,880162.18—
IQ2_Sbartowski188,466,899,360175.522.64
IQ2_Mbartowski213,027,940,928198.402.98
AD-IQ2_MAtomicChat218,079,853,408203.10—
Q2_Kbartowski219,168,205,376204.123.06
IQ3_XXSbartowski247,367,821,984230.383.46
Q3_K_Mbartowski275,057,306,272256.173.85
IQ4_XSbartowski317,077,154,752295.304.43
Q4_K_Mbartowski357,969,521,664333.395.01
AD-Q4_K_MAtomicChat354,394,733,920330.06—
Q5_K_Mbartowski436,319,120,672406.356.10
Q6_Kbartowski501,582,491,136467.147.01
Q8_0bartowski608,380,104,192566.60—

Bartowski marks both 1-bit files “not recommended”. AtomicChat measured its 1-bit files against BF16. AD-IQ1_S picked the same next token 86.41% of the time, and AD-IQ2_M 92.72%. AD-Q4_K_M reached 96.86%.

The MTP layer differs by repo. Bartowski includes it, stored at Q4_0. Add --spec-type draft-mtp to use it. AtomicChat’s card says its files do not include the MTP head.

Downloads shown by the Hugging Face API on 22 October: bartowski 2,172, AtomicChat 1,622, the original FP8 repo 3,292.

Why the Context Costs So Little

Only the 9 MLA layers keep a cache that grows with context. The 63 KDA layers keep a fixed state.

1. The MLA cache. Config.json gives kv_lora_rank 512 and qk_rope_head_dim 64. llama.cpp’s bailingmoe3.cpp caches the compressed latent plus the rope part.

f16:  (512 + 64) values x 2 bytes x 9 MLA layers = 10,368 bytes per token

32,768 tokens   = 0.32 GiB
131,072 tokens  = 1.27 GiB
262,144 tokens  = 2.53 GiB

AtomicChat’s card gives “about 10 KB per token”, which matches. If a runtime stores V separately from K, the cost rises to 19,584 bytes per token. That is still only 4.78 GiB at 262K.

2. The fixed KDA state. Config.json gives 64 heads with a head dimension of 128 and a convolution kernel of 4.

Recurrent state: 63 layers x 64 heads x 128 x 128 x 4 bytes (F32) = 252 MiB
Conv state:      63 layers x 3 x (3 x 64 x 128) x 4 bytes          = 17.7 MiB
Total per conversation                                            ~ 270 MiB

The VQ-GGUF uploader measured 276 MiB of KDA state in their runtime. Our estimate is within 3%.

3. The full budget. Weights + 2.53 GiB cache + 0.27 GiB state + a compute buffer. We budget 2 GiB for the buffer. We did not measure it.

Fit Table by Hardware

Mac rows use the Metal limit. PC rows use VRAM plus system RAM, minus about 8 GiB for the OS. Every row is our arithmetic, not a measurement.

HardwareTotal memoryBest llama.cpp fileFits?Context
128GB Mac (M5 Max)107.52 GiB default limitnoneNo. IQ1_S is 122.01 GiB—
DGX Spark / GB10121.63 GiB totalnoneNo in llama.cpp. See the VQ note below—
Strix Halo 128GB128GB sharednoneNo—
Two DGX Sparks (RPC)2 x 121.63 GiBIQ2_XXS (159.06)In theory. UntestedUnknown
RTX 3090 24GB + 192GB DDR5~216 GiBIQ2_XXS (159.06) or IQ2_S (175.52)Yes, with expert offload262K
RTX 5090 32GB + 256GB DDR5~288 GiBIQ3_XXS (230.38) or Q3_K_M (256.17)Yes, with expert offload262K
Mac Studio M5 Ultra 256GB234.38 GiB with the raised limitQ2_K (204.12) or IQ2_M (198.40)Yes262K
RTX PRO 6000 96GB + 256GB DDR5~352 GiBIQ4_XS (295.30)Yes, with expert offload262K
Mac Studio M5 Ultra 512GBnot orderable on 22 OctQ4_K_M (333.39) or Q5_K_M (406.35)Would fit262K

The 256GB Mac needs one command. AtomicChat’s card gives sudo sysctl iogpu.wired_limit_mb=240000 for a 256GB machine. That is 234.38 GiB. Q2_K plus the full cache and state is about 209 GiB. IQ3_XXS (230.38 GiB) leaves under 4 GiB, so skip it.

The one 128GB route is experimental. Baekpica/Ling-3.1-flash-VQ-GGUF stores the experts at about 1.5 bits per weight. All 71 parts total 107.81 GiB. Its card says “ordinary llama.cpp, Ollama and Transformers loaders do not implement this format”. It runs only in the uploader’s ds4-dfm-rs runtime. The card warns about loops and broken characters.

Two DGX Sparks are possible, not proven. NVIDIA says up to four Sparks link over ConnectX-7. llama.cpp can split a model across machines with its RPC backend. Its README calls RPC “proof-of-concept” and “fragile”. We found no report of Ling-3.1-flash running over RPC on two Sparks.

How Fast Will It Be?

We found one measured number, and it is not from llama.cpp. The VQ uploader reports these figures on one DGX Spark, with ds4-dfm-rs (community-reported):

WorkloadPrefillDecode
2K-64K sweep, MTP off774.1 tok/s17.70 tok/s
2K-32K sweep, two MTP drafts861.0 tok/s23.58 tok/s

The card says each token reads about 10.75 GB of weights in that build. A Spark has 273 GB/s, so its ceiling is about 25.4 tok/s. The measured 17.70 tok/s is 70% of that ceiling.

The rows below are bandwidth ceilings, not predictions. Real speed lands below them.

Mac Studio M5 Ultra 256GB, Q2_K (all in unified memory):
  25B active x 3.06 bits / 8 = 9.56 GB per token
  1,200 GB/s / 9.56 GB       = ~125 tok/s ceiling

PC, experts in RAM (trunk on GPU), dual-channel DDR5-4800 = 76.8 GB/s:
  IQ2_XXS: 8.56B x 2.39 / 8 = 2.56 GB per token -> ~30 tok/s ceiling
  Q2_K:    8.56B x 3.06 / 8 = 3.27 GB per token -> ~23 tok/s ceiling
  IQ4_XS:  8.56B x 4.43 / 8 = 4.74 GB per token -> ~16 tok/s ceiling

The PC rows assume every routed expert sits in RAM. A bigger GPU holds some experts and raises the ceiling. Four DIMMs often run slower than two, so check your board’s rated speed.

Software Support, Checked 22 October 2026

RuntimeStatusSource
llama.cppSupported. Architecture bailingmoe3 added in PR #26608, merged 17 August 2026 for Ling-3.0-flashGitHub PR
llama.cpp build to useb11571+ (AtomicChat card), b11627+ (bartowski card)GGUF cards
LM Studio, koboldcpp, JanListed by bartowski’s card. We did not test thembartowski card
MLX (mlx-lm)Code maps bailing_hybrid + BailingMoeV3ForCausalLM to bailing_moe_v3.py. No Ling-3.1-flash MLX quant on Hugging Facemlx-lm source, HF search
OllamaNo ling-3.1-flash library page (404)ollama.com
SGLang, vLLMinclusionAI’s recommended path, for 8-GPU serversmodel card

Run bartowski’s files with:

llama-server -hf bartowski/Ling-3.1-flash-GGUF:Q2_K --spec-type draft-mtp -c 262144

On a PC, add --n-cpu-moe and lower it until the GPU is full. Our —n-cpu-moe guide shows how.

What to Buy

Prices as of October 2026, from our price reference and apple.com.

OptionPriceWhat it runs
Mac Studio M5 Ultra 256GB (64-core GPU)$9,499 (apple.com, 22 October)Q2_K, full context
RTX PRO 6000 96GB$14,999.99 in stock (Central Computer, 30 September)IQ4_XS, with 256GB of RAM
RTX 5090 32GBmarketplace from $6,911 (17 October)IQ3_XXS, with 256GB of RAM
RTX 3090 24GB (used)$1,518 average (13 October)IQ2_XXS, with 192GB of RAM
DDR5 128GB kit (2 x 64GB)from $2,099.99 (Newegg, 1 October)half of a 256GB build

The Mac Studio is the simplest buy. One box holds Q2_K and the full 262K context. No offload tuning.

For better quants, a GPU workstation wins. The RTX PRO 6000 96GB with 256GB of DDR5 holds IQ4_XS. That is two quant steps above what the 256GB Mac holds. It needs a board that takes 4 x 64GB DIMMs.

On a smaller budget, keep the trunk on the GPU. An RTX 5090 32GB or a used RTX 3090 24GB holds the 16.4B-weight trunk at 2-4 bits. The RAM holds the experts and sets the speed.

Do not buy a 128GB machine for this model. A DGX Spark, a Strix Halo box or a 128GB Mac cannot load any llama.cpp file of it.

Honest Caveats

  1. We did not run the model. Every fit row is arithmetic from file sizes, config.json and the llama.cpp source.
  2. The only speed number is from a custom runtime. No llama.cpp tok/s for Ling-3.1-flash was published where we looked.
  3. The 2 GiB compute buffer is a budget. Check the buffer sizes in your llama-server log.
  4. The 256GB Mac limit is AtomicChat’s suggestion. We did not find a log of the default limit on a 256GB M5 Ultra.
  5. “Trunk” counts use the card’s 25B figure. AtomicChat’s card says “about 24B” active. The split shifts by about 1B.
  6. 2-bit files lose quality. AtomicChat measured 92.72% top-1 agreement for AD-IQ2_M. Test it on your own tasks.

Sources

  • Ling-3.1-flash model card: parameters, layers, experts, 1M-context claim, SGLang and vLLM recipes
  • config.json: max_position_embeddings, rope_scaling, kv_lora_rank, qk_rope_head_dim, heads, head_dim, short_conv_kernel_size, experts, moe_intermediate_size, first_k_dense_replace
  • Hugging Face API: creation date, checkpoint parameter count, downloads
  • File trees for bartowski and AtomicChat: byte sizes
  • bartowski GGUF card: build b11627, bits per weight, MTP flag, compatible apps
  • AtomicChat GGUF card: build b11571, KL divergence and top-1 agreement, memory table, Mac sysctl value
  • Baekpica VQ-GGUF card: 107.81 GiB VQ size, DGX Spark speed, measured KDA state, DGX Spark MemTotal
  • llama.cpp PR #26608: BailingMoE3 support, merged 17 August 2026
  • llama.cpp source, master branch: src/models/bailingmoe3.cpp (MLA latent cache, KDA recurrent state)
  • llama.cpp RPC README: “proof-of-concept” status
  • llama.cpp issue #21680: 115,448.73 MB Metal working set on a 128GB M5 Max
  • mlx-lm source: architecture remap to bailing_moe_v3
  • Apple Mac Studio store and specs: $9,499 for 256GB, 512GB “coming late October”, 1.2TB/s
  • NVIDIA DGX Spark: 273 GB/s, ConnectX-7 clustering of up to four systems
  • OpenClaw DC hardware price reference, last updated 17 October 2026: RTX PRO 6000, RTX 5090, RTX 3090 and DDR5 128GB kit rows

See Also

Read next

Can I Run Ornith 1.5 122B Locally? (2026): Yes, Q6 on 128GB
Ornith 1.5 122B is a Qwen3.5-122B-A10B fine-tune. Byte-exact GGUF sizes from 37.59 GiB to 232.24 GiB, the 24 KB/token cache math, and which quant fits 24GB, 32GB, 96GB, 128GB Macs, DGX Spark and Strix Halo.
Can I Run Beam 1.0 501B Locally? (2026): Yes, on 256GB
Reflection's Beam 1.0 is a 501B MoE with 23.4B active. Byte-exact GGUF sizes from 95.98 to 496.20 GiB, the 36 KB/token cache math, and what fits 128GB, 256GB Macs, DGX Spark clusters and RTX PRO 6000s.
Can I Run MiniMax M3.1 Flash Locally? (2026): Yes, at 192GB
MiniMax M3.1 Flash is a 428B MoE with 23B active. Byte-exact GGUF and MLX sizes from 90 to 241 GiB, why its 8-bit file is only 9 GiB bigger than 4-bit, and what fits 128GB, 192GB and 256GB machines.
Can I Run Mistral Large 4 Locally? (2026): Only at 256GB+
Mistral Large 4 is a 1T MoE with 52B active. Byte-exact GGUF sizes from 217 to 1,955 GiB, the cache math, and what fits a 256GB Mac Studio, two DGX Sparks, a GPU plus RAM, or RTX PRO 6000 cards.