Friday, December 4, 2026
Qwen4-35B-A3B: 3B Active, 57B on Disk, and a 20B Table That Can Stay on Your SSD
Posted by

Qwen released Qwen4-35B-A3B on December 4 under Apache 2.0, with weights on Hugging Face and ModelScope (Qwen4 repository). It is the first open model in the Qwen4 series. The flagship, Qwen4-Max, arrived on November 16 as a hosted-only model.
The name undersells the download. "35B-A3B" counts the mixture-of-experts backbone and the 3B parameters it activates per token. The full BF16 checkpoint is about 57B parameters and roughly 106 GiB. The other 22B is mostly a 20B n-gram embedding table that llama.cpp can read from your SSD instead of loading into GPU memory. That table is why the first wave of local reports runs on far smaller GPUs than the file size suggests. Qwen's own benchmark chart also shows where the model trails its larger predecessor.
What's in the 57B
Qwen's model card lists the language model as "35B with 3B activated, plus 20B n-gram embedding and 2B MTP." The published config.json matches:
| Part | Size | What it does |
|---|---|---|
| MoE backbone | 35B total, 3B active per token | 256 experts; each token uses 8 routed experts plus 1 shared |
| N-gram embedding | 20B | 10,000,000 bigram and trigram entries, looked up at layer 2 |
| MTP head | 2B | One extra layer used to draft tokens for speculative decoding |
| Vision encoder | separate file in GGUF builds | Image and video input |
The n-gram table is the unusual part. The card says it "improves model quality without extra compute or accelerator memory overhead." Each token looks up a few rows of the table, so nothing has to multiply the whole thing on every step. That access pattern is what makes disk-backed loading workable.
Long context is cheap for a similar reason. The 40 layers follow a fixed pattern: ten blocks of three Gated DeltaNet linear-attention layers followed by one Qwen Sparse Attention layer. Only those 10 sparse-attention layers keep a conventional KV cache, and each uses 2 KV heads with a 2,048-token selection budget. The native context is 1,048,576 tokens.
This is the same architecture family as Qwen3.8-Flash-Next, which we covered in Flash Wars. Flash-Next is much larger: 125B with 6B active, plus a 51B n-gram table and a 4B MTP head.
Where Qwen's own chart says it wins and loses
Qwen's announcement says the model "outperforms dense Qwen3.8-27B, and matches Qwen3.8-Flash-Next at ~1/3 the size." The benchmark chart on the model card has 12 rows:
| Benchmark | Qwen4-35B-A3B | Qwen3.8-Flash-Next | Qwen3.8-27B | Inkling2 Mini |
|---|---|---|---|---|
| DeepSWE v1.1 | 61.8 | 58.7 | 42.2 | 48.2 |
| Terminal-Bench 4.1 | 21.2 | 24.2 | 5.6 | 5.6 |
| FrontierCode-AA 2.0 | 16.1 | 27.1 | 14.9 | 15.1 |
| NL2Repo | 51.7 | 48.1 | 42.3 | 41.8 |
| Work360 | 42.9 | 43.7 | 37.1 | 30.4 |
| APEX-Agents v1.1 | 59.0 | 61.0 | 47.5 | 50.9 |
| AA-Briefcase v1.1 (Elo) | 1486 | 1567 | 1391 | 1263 |
| AutomationBench-AA | 57.9 | 55.9 | 48.2 | 41.8 |
| HealthBench Professional | 47.4 | 34.8 | 29.8 | 45.7 |
| GPQA | 86.9 | 91.7 | 89.2 | 86.9 |
| Chartography | 27.8 | 24.6 | 27.8 | 22.1 |
| VideoIndex | 52.9 | 51.4 | 51.9 | 44.0 |
The new model beats Flash-Next on 6 rows and loses on 6. The losses cluster on agentic and terminal work: Terminal-Bench 4.1, FrontierCode, APEX-Agents and AA-Briefcase. "Matches" is a fair summary of the split, but the coding-agent rows favor the bigger model, and FrontierCode is an 11-point gap.
Against dense Qwen3.8-27B, the claim mostly holds. The new model leads on 10 rows, ties on Chartography, and trails on GPQA (86.9 vs 89.2). The Terminal-Bench gap is the largest jump on the chart: 21.2 against 5.6.
The chart's sources vary by row. Qwen's footnote says Terminal-Bench 4.1, FrontierCode-AA 2.0, AA-Briefcase and AutomationBench come from Artificial Analysis, APEX-Agents from Mercor's leaderboard, and Work360 is Qwen's in-house benchmark. The chart doesn't state the serving precision or the reasoning-effort setting behind each row. These are scores for the model as Qwen and those benchmark operators ran it, and none of them tells you how a 2-bit or 4-bit local quant performs.
The 20B table doesn't need your GPU
llama.cpp added Qwen4 support in PR #33626, merged December 3. The flag that matters is --lazy-mode. With it on, llama.cpp reads the rows of certain large tensors from disk on demand instead of keeping them resident. The default, auto, applies this to any such tensor larger than 4 GiB, which covers the n-gram table in every current quant. It requires mmap (flag definition).
Unsloth's GGUF repository splits each quant into two shards, and the second one is the table:
| Unsloth quant | Shard 1 (model) | Shard 2 (n-gram table) | Total |
|---|---|---|---|
| UD-IQ2_XXS | 11.9 GB | 11.5 GB | 23.4 GB |
| UD-IQ4_XS | 20.5 GB | 11.5 GB | 32.0 GB |
| UD-Q4_K_M | 23.7 GB | 11.5 GB | 35.2 GB |
Download both shards; the model won't load without the second. The vision projector is a separate file: 0.9 GB in BF16 from Unsloth, or 0.6 GB as ggml-org's Q8_0. The external MTP head is another 2.0 GB at Q8_0.
"Stays on your SSD" needs one qualifier. Rows read from disk pass through the operating system's page cache, so a warm run keeps part of the table in system RAM, and a cold run pays NVMe latency. The table costs no VRAM, but it isn't free.
What actually ran: 8 GB and 24 GB reports
8 GB laptop. One user published a reproducible run with scripts and a JSON results file:
- Hardware: an RTX 5060 Laptop GPU (8 GB), an i7-14650HX, 14 GiB of usable RAM and a PCIe 4.0 NVMe drive.
- Software: llama.cpp build b12973 with CUDA, running Unsloth's UD-IQ2_XXS.
The results show that placement matters more than raw VRAM:
| Placement | Decode | Peak VRAM | Process RAM |
|---|---|---|---|
| All routed experts in CPU RAM, everything else on GPU | 37.2 tok/s | 3,819 MiB | 12,024 MiB |
| Experts for 13 of 41 layers on GPU, rest in RAM | 43.8 tok/s | 6,534 MiB | 11,766 MiB |
Naive split: first 10 layers on GPU (-ngl 10) | 13.0 tok/s | 4,497 MiB | 12,571 MiB |
Moving the right tensors, rather than whole layers, roughly tripled decode speed. The all-experts-in-RAM setup is close to llama.cpp's built-in --cpu-moe flag, which keeps every MoE expert weight on the CPU.
The limits are just as clear in the file. Every run used a 163-token prompt and 127 generated tokens. The 32K and 128K "context" runs allocated that much cache but never filled it. They show the model loads; they don't show what happens at a full context. Nothing in the report measures 2-bit output quality.
24 GB GPU. The post that spread the "runs on consumer hardware" claim, by Alexey Fateev, argues the model was "built specifically to fit a single 24 GB GPU." That is his reading, not Qwen's. His recipe is UD-IQ4_XS: the 20.5 GB model shard in VRAM, the vision projector alongside it, and the table streamed from SSD.
His own Strata fork (a separate inference engine, not llama.cpp) claims 288.8 tok/s on prose and 319.6 on code on one RTX 3090. An independent tester reproduced the setup and got different numbers:
- Setup: an RTX 3090 capped at 320 W, 93 GB of RAM, the full 262,144-token context with int8 KV, and MTP on.
- Speed: a 229.7 tok/s mean across a 14-prompt corpus, so they did not reproduce the README's figures.
- Memory: 23,702 MiB of the card's 24,576 MiB in use.
- Setup problems: they documented six issues that block the fork's documented Quickstart.
Both numbers are fast. Only one comes with a reproduction and caveats attached.
AMD and mini PCs: untested:
Qwen4 support in llama.cpp added no CUDA-only kernels, and --lazy-mode lives in the model loader rather than a GPU backend. Lemonade's llamacpp-rocm b1398 build already includes Qwen4 and ships a gfx110X archive that covers the Radeon 780M. AMD-Ecosystem's latest ROCm nightly (November 30) predates the merge.
No one has published a Qwen4 run on a 780M or another AMD iGPU yet, and there are known risks:
- GPU reset: a user reported a GPU reset on a 780M running the previous-generation Qwen3.6-35B-A3B at Q8 on a Lemonade ROCm build (issue #122).
- Slow inference: AMD's ROCm 7.14 release notes list slower-than-expected LLM inference on RDNA3 GPUs as a known issue.
- Memory: on paper, a 64 GB mini PC holds UD-Q4_K_M plus the table in memory. With 32 GB you're limited to a 2-bit or 3-bit quant unless
--lazy-modekeeps the table on disk, which no one has verified on AMD yet.
Should you switch from Qwen3.8-27B?
If you run Qwen3.8-27B locally for coding agents, Qwen's chart makes a strong case on paper: higher DeepSWE, NL2Repo and Terminal-Bench scores, with about a ninth of the active parameters per token. The open question is quantization. The chart measures the model as Qwen serves it. The one local report that fits an 8 GB card uses 2-bit weights, and nobody has published coding results at that precision yet.
- 24 GB GPU: UD-IQ4_XS is the natural first try with llama.cpp, because the 20.5 GB model shard fits with the table left on SSD. Nobody has published a llama.cpp measurement of that setup yet. The only independent 24 GB measurement used the Strata fork, with the table held in RAM and 93 GB of system memory.
- 8 GB GPU: one published run shows it loads and generates with UD-IQ2_XXS, all routed experts in system RAM and 14 GiB of usable RAM, but only on a 163-token prompt. Long-prompt behavior and 2-bit output quality are untested, so run your own tasks before you rely on it.
- Hosted: Qwen serves it as
qwen4-35b-a3bon Qwen Cloud.
Check Flash-Next's numbers if you rely on terminal agents. On the chart, the older, larger model still leads on Terminal-Bench, FrontierCode and APEX-Agents.
How this was checked:
Architecture figures come from the model card and config.json on Hugging Face, and benchmark scores from Qwen's published chart. File sizes come from the Unsloth and ggml-org repository listings. Flag behavior comes from llama.cpp's common/arg.cpp. All were checked on December 4, 2026. Speed and memory numbers are the cited users' measurements; this article did not run the model.
Related: Qwen3.8-27B for local coding agents · Flash Wars · Setting up Qwen3.6-27B for local coding
Related Articles & Deep Dives
#qwenQwen3.8-27B: Local Coding Agents, and the Overthinking Problem
Qwen3.8-27B is an Apache 2.0 local agent model that beats Claude Opus 4.8 on agentic tasks — but its default reasoning over-thinks. Setup, MTP, and the right settings.
#qwenSetting Up Qwen3.6-27B for Local Coding: Complete Guide
A step-by-step guide to running Qwen3.6-27B locally for coding tasks — including GGUF quantization options, hardware requirements, llama.cpp and Ollama setup, and coding workflow integration.
#kimi-k3-1-proKimi K3.1 Pro: 2.8T Open Weights, 104B Active, and What Actually Changed
K3.1 Pro is a post-training upgrade of July's K3 with 24 rebuilt attention layers. Vals' independent run corroborates the 46-point Terminal-Bench gain over K3; SemiAnalysis' GDPx still places it behind OpenAI, Anthropic, Google, and Alibaba.