Ling 3.1 Flash 560B-A25B VRAM requirements
Ling 3.1 Flash 560B-A25B needs about 355 GB of VRAM at Q4_K_M with 8K context, so it needs a 640 GB setup such as 8× H100 SXM; a 24 GB card is too small. Ling 3.1 Flash 560B-A25B has 572.1B parameters (the model card describes 560B total and 25B active per token; this count comes from the published safetensors metadata), of which about 25B are used per token; all 512 experts still have to be in memory. With the same 8K context and one request it needs 587 GB at FP8 and 1,173 GB at FP16/BF16. The published weights take 534 GB (FP8). It does not fit on a 24 GB card at Q4_K_M; the smallest setup here that holds it with an 8K context is the M3 Ultra Mac Studio (512 GB, 384 GB usable).
355 GB at Q4_K_M, 8K context, one request
- FP8
- 587 GB
- FP16 / BF16
- 1,173 GB
- Published weights
- 534 GB
- Smallest setup, Q4_K_M
- M3 Ultra Mac Studio (512 GB, 384 GB usable)
Worked example: Ling 3.1 Flash 560B-A25B with 32K tokens
Inputs: Ling 3.1 Flash 560B-A25B · Q4_K_M weights · 32,768 tokens of context · one request · FP16 KV cache
- Weights (572.1B at Q4_K_M)
- 322 GB
- KV cache (10 KB per token)
- 324 MB
- Buffers and runtime (0.5 GB + 10%)
- 32.8 GB
- Total
- 355 GB
The smallest setup here that holds it is the M3 Ultra Mac Studio (512 GB, 384 GB usable), with about 28.6 GB to spare. Change the inputs in the calculator
What makes Ling 3.1 Flash 560B-A25B's memory use different
It uses multi-head latent attention: each MLA layer caches a latent of 576 values per token instead of 20,480 for 64 full key and value heads, 35.6× less.
63 of its 72 layers keep a fixed-size KDA recurrent state, so the cache grows by 10 KB per token where caching every layer would take 81 KB.
As a mixture-of-experts model it reads about 14.1 GB of its 322 GB Q4_K_M weights per generated token (4%), so it writes like a much smaller model while needing memory for all of them.
How much VRAM does Ling 3.1 Flash 560B-A25B need?
Ling 3.1 Flash 560B-A25B needs 355 GB at Q4_K_M, 623 GB at Q8_0 and 1,173 GB at FP16 with 8,192 tokens of context and one request. Each total below is the weights plus the FP16 KV cache and the runtime overhead (0.5 GB plus 10%), and each row opens the calculator with that setting. What the GGUF names mean.
| Precision | Weights | Total | Smallest setup |
|---|---|---|---|
| As published (FP8) | 534 GB | 588 GB | 8× H100 SXM (640 GB) |
| FP16 / BF16 | 1,066 GB | 1,173 GB | None listed |
| FP8 / INT8 | 533 GB | 587 GB | 8× H100 SXM (640 GB) |
| INT4 (AWQ / GPTQ) | 283 GB | 312 GB | M3 Ultra Mac Studio (512 GB, 384 GB usable) |
| GGUF Q8_0 | 566 GB | 623 GB | 8× H100 SXM (640 GB) |
| GGUF Q6_K | 437 GB | 481 GB | 8× H100 SXM (640 GB) |
| GGUF Q5_K_M | 378 GB | 416 GB | 8× H100 SXM (640 GB) |
| GGUF Q4_K_M | 322 GB | 355 GB | M3 Ultra Mac Studio (512 GB, 384 GB usable) |
| GGUF IQ4_XS | 290 GB | 319 GB | M3 Ultra Mac Studio (512 GB, 384 GB usable) |
| GGUF Q3_K_M | 260 GB | 287 GB | M3 Ultra Mac Studio (512 GB, 384 GB usable) |
| GGUF IQ3_XXS | 220 GB | 242 GB | M3 Ultra Mac Studio (512 GB, 384 GB usable) |
| GGUF Q2_K | 223 GB | 246 GB | M3 Ultra Mac Studio (512 GB, 384 GB usable) |
Fine-tuning Ling 3.1 Flash 560B-A25B? Ling 3.1 Flash 560B-A25B VRAM for LoRA, QLoRA and full training.
Run Ling-3.1-flash with SGLang
The official MIT-licensed checkpoint stores its weights mainly in FP8: 573,781,078,249 bytes (534 GB). The publisher describes a 560B model with 25B active parameters per token. Those active parameters reduce computation; all 512 routed experts still need storage. The safetensors metadata reports 572.1B stored parameters, which is the count used for the alternative-precision estimates above.
The model card recommends SGLang’s day-0 image with 8 H200 GPUs, TP8 and EP8, and MTP speculative decoding. Its alternative is 4 GB300 GPUs with --tp 4 --ep 4. These are the publisher’s serving examples, not minimum-memory claims.
docker run --gpus all --network host --ipc=host --rm lmsysorg/sglang:dev-ling-3.1-flash python3 -m sglang.launch_server --model-path inclusionAI/Ling-3.1-flash --tp 8 --ep 8 --speculative-algorithm NEXTN --host 0.0.0.0 --port 30000 The released configuration sets 262,144 tokens, while the model card advertises a 1M-token context. This page uses 262,144. Seven KDA layers followed by one MLA layer repeat nine times; only the nine MLA layers add cache with context. Their compressed cache has 512 latent values plus 64 rotary values per token. KDA recurrent state, MTP and temporary serving allocations still need runtime headroom.
ModelVRAM has not run this command on a GPU. The quantization rows are storage estimates; check runtime support and actual files before choosing a quantized deployment.
Ling 3.1 Flash 560B-A25B at 8K, 32K, 128K and 256K (full) tokens of context
9 of its 72 layers use multi-head latent attention and 63 are KDA recurrent layers with no growing cache. Each extra token of context adds 10 KB of FP16 cache per request. The last column is the smallest setup here, one card or a group, that holds it at Q4_K_M. How the KV cache works.
| Context | KV cache, FP16 | Total at Q4_K_M | Total at Q8_0 | Smallest setup, Q4_K_M |
|---|---|---|---|---|
| 8K tokens | 81 MB | 355 GB | 623 GB | M3 Ultra Mac Studio (512 GB, 384 GB usable) |
| 32K tokens | 324 MB | 355 GB | 624 GB | M3 Ultra Mac Studio (512 GB, 384 GB usable) |
| 128K tokens | 1.27 GB | 356 GB | 625 GB | M3 Ultra Mac Studio (512 GB, 384 GB usable) |
| 256K tokens | 2.53 GB | 358 GB | 626 GB | M3 Ultra Mac Studio (512 GB, 384 GB usable) |
How fast Ling 3.1 Flash 560B-A25B writes
Tokens per second for one request with 8,192 tokens of context, estimated from memory bandwidth and the parameters read per token. A dash means it does not fit on one card. Try other settings in the speed calculator.
| Hardware | Bandwidth | Q4_K_M | FP8 |
|---|---|---|---|
| RTX 3060 12GB | 360 GB/s | — | — |
| RTX 4090 | 1,008 GB/s | — | — |
| RTX 5090 | 1,792 GB/s | — | — |
| M4 Max Mac (128 GB) | 546 GB/s | — | — |
| M3 Ultra Mac Studio (512 GB) | 819 GB/s | 16–27 | — |
| H100 SXM | 3,350 GB/s | — | — |
| H200 | 4,800 GB/s | — | — |
Longest context on a multi-GPU group
No single card in this table holds it at Q4_K_M, Q8_0 or FP8, so these rows use GPU groups: how many tokens of context Ling 3.1 Flash 560B-A25B fits on each, in one tensor-parallel group with one request, an FP16 KV cache and 0.5 GB left free. "Full" means the model's whole context window fits.
| Group | Memory | Q4_K_M | Q8_0 | FP8 |
|---|---|---|---|---|
| 2× RTX 3060 12GB | 24 GB | No | No | No |
| 2× RTX 3090 | 48 GB | No | No | No |
| 2× RTX 4090 | 48 GB | No | No | No |
| 2× RTX 5090 | 64 GB | No | No | No |
| 4× RTX 3090 | 96 GB | No | No | No |
| 8× H100 SXM | 640 GB | 256K (full) | 256K (full) | 256K (full) |
| 8× H200 | 1,128 GB | 256K (full) | 256K (full) | 256K (full) |
Model details
- Parameters
- 572.1B (572,120,680,768); the model card describes 560B total and 25B active per token; this count comes from the published safetensors metadata
- Experts
- 512 routed experts, all loaded
- Active per token
- 25B
- Layers
- 9 of its 72 layers use multi-head latent attention and 63 are KDA recurrent layers with no growing cache
- Attention cache
- 576 values per token (compressed latent)
- Context length
- 262,144 tokens
- Published weights
- 534 GB (FP8)
- On Hugging Face
- inclusionAI/
Ling-3.1-flash - Reported benchmarks
- None published in the model card for GPQA, MMLU-Pro or LiveCodeBench.
Why this estimate looks this way
At Q4_K_M and an 8K-token context, Ling 3.1 Flash 560B-A25B uses 322 GB for weights, 81 MB for its FP16 KV cache and 32.7 GB for estimated runtime overhead, totaling 355 GB. The overhead is a 0.5 GB base plus 10% of weights and cache.
This is a mixture-of-experts model: all 512 experts contribute to the 572.1B parameters held in memory, even though only about 25B parameters run per token. Using only active parameters would understate VRAM.
Its attention layout matters for long context: 9 of its 72 layers use multi-head latent attention and 63 are KDA recurrent layers with no growing cache. The FP16 cache grows by about 10 KB per additional token per request.
Only the 9 MLA layers keep a context-growing KV cache (576 values per token per layer). The 63 KDA layers keep fixed recurrent state, left to the runtime allowance. The model card advertises 1M tokens, but config.json sets 262,144; the tables use the configured limit. MTP and serving buffers may need more memory.
The architecture and published checkpoint size come from the model's config.json and weight files. These are estimates rather than measured peak memory; inference engines can reserve extra buffers or preallocate the full configured cache.
Ling 3.1 Flash 560B-A25B next to similar-sized models
The three models here closest to it in parameter count, at Q4_K_M with 8,192 tokens of context.
| Model | Parameters | Total | KV per token | Smallest setup |
|---|---|---|---|---|
| Ling 3.1 Flash 560B-A25B | 572.1B, 25B active | 355 GB | 10 KB | M3 Ultra Mac Studio (512 GB, 384 GB usable) |
| DeepSeek V3 / R1 | 684.5B, 37B active | 425 GB | 69 KB | 8× H100 SXM (640 GB) |
| DeepSeek V3.2 | 685.4B, 37B active | 426 GB | 76 KB | 8× H100 SXM (640 GB) |
| GLM-5.3 | 753.3B, 40B active | 468 GB | 90 KB | 8× H100 SXM (640 GB) |
Ling 3.1 Flash 560B-A25B VRAM questions
How much VRAM do I need to run Ling 3.1 Flash 560B-A25B locally?
About 355 GB at Q4_K_M with an 8K context and one request, by the bits-per-weight estimate, and 1,173 GB at BF16. The smallest setup listed here that holds Q4_K_M is the M3 Ultra Mac Studio (512 GB, 384 GB usable).
How much more VRAM does Ling 3.1 Flash 560B-A25B need for 32K or 128K tokens of context?
Its FP16 KV cache is 81 MB at 8K, 324 MB at 32K, 1.27 GB at 128K for one request, so 128K adds 1.19 GB over 8K, plus 10% overhead. A q8_0 cache
Does Ling 3.1 Flash 560B-A25B need less VRAM because only 25B parameters are active?
No. All 512 experts stay loaded, so the Q4_K_M weights take 322 GB. The active parameters decide speed: each generated token reads about 14.1 GB of them.
Badge for your model card
Paste it into a Hugging Face or GitHub README; it shows the Q4_K_M total above and links to this page. Q8_0 and FP16 badges.
Numbers read from the model files on Hugging Face on . Compare it with other models in the reproducible model and GPU report.