Qwen4-35B-A3B Fits 1M Context on a 24 GB GPU
In this article
Alibaba’s Qwen team has released Qwen4-35B-A3B, the first open-weight model in the Qwen4 family, under Apache 2.0. It is a mixture-of-experts model with 35B main parameters and about 3B active per token, and it accepts text, image, and video with a native context of 1,048,576 tokens. Qwen says the model is designed for agentic work; the practical claim is that a 4-bit build runs on a single 24 GB GPU or Mac while exposing a million-token working memory and permissive license.
The attention stack does the heavy lifting. The decoder repeats a block 10 times: three Gated DeltaNet layers followed by one Qwen Sparse Attention layer, and every layer feeds an MoE block. Gated DeltaNet is linear attention with a fixed-size state, so long-sequence cost stays bounded rather than quadratic. Qwen Sparse Attention groups tokens in fours, averages their keys, and lets each query attend to at most 512 groups—2,048 tokens—regardless of total context. Each of the 256 experts in the MoE block has a 512 intermediate size; a token activates 8 routed experts plus 1 shared expert, keeping per-token compute near the 3B mark.
The 35B name undercounts the disk footprint. The model card lists 40 layers with a 2,048 hidden size, but Hugging Face’s safetensors metadata puts total parameters at roughly 56.8B. The difference is a 20.5B-parameter n-gram embedding table at layer 2 that stores bigram and trigram patterns. Unsloth’s deployment guide keeps that table memory-mapped from SSD, which is why 4-bit builds fit in 20.5 to 24.7 GB of combined RAM and VRAM; 3-bit builds drop to 17.2 to 19.4 GB. Unsloth reports its UD-Q4_K_XL quant at 95.0% against 95.3% for BF16, a 0.3-point gap.
Benchmarks are the weakest evidentiary link. Qwen published eight scores in its launch chart; all are self-reported, and four footnotes identify Artificial Analysis evaluations rather than Qwen’s own runs. The model beats dense Qwen3.8-27B on all eight. Against the 125B-main-parameter Qwen3.8-Flash-Next, it wins three of eight. DeepSWE v1.1 is the strongest result at 61.8 versus 58.7; FrontierCode-AA 2.0 is the worst at 16.1 versus 27.1, an 11-point gap. Qwen frames the model as matching Flash-Next at about one-third the size; the chart supports that on agentic software benchmarks and contradicts it on frontier coding.
| Benchmark | Qwen4-35B-A3B | Qwen3.8-Flash-Next | Qwen3.8-27B | Inkling 2 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 |
Hosted pricing shows the economics. OpenRouter lists two providers for qwen/qwen4-35b-a3b, both with 1,048,576-token context. Featherless serves BF16 at $0.06 per million input, $0.36 per million output, and $0.003 per million cached input reads, with 52 tokens/second and 1,635 ms first-token latency. PrimeIntellect serves FP8 at the same prices with 184 tokens/second, 443 ms latency, and a 65,536 max completion ceiling versus 32,768 for Featherless. Both support structured output and tool calling.
AI Mastery analysis
The n-gram table is the under-discussed decision here. It adds 20.5B parameters that do not route on each token, so the 35B name and 3B-active figures both hold while the actual download approaches 57B. As long as it stays memory-mapped from SSD, deployment cost is mostly hidden; for fine-tuning, the model card is silent on whether to freeze, update, or drop that table.
The two OpenRouter endpoints make the same point as the local AI workload decision not capability race. PrimeIntellect’s FP8 serving delivers about 3.5x the token throughput of Featherless’s BF16 and cuts first-token latency by more than 70% at identical per-token prices. That is a quantization and serving difference, not a model difference. Until independent runs cover the released weights, the 61.8 on DeepSWE and Unsloth’s 95.0% quant score remain self-reported by their respective authors. The release moves the 1M context pricing not capability race question from API economics to a 24 GB GPU.
Sources
Frequently asked questions
How much VRAM does Qwen4-35B-A3B need locally?
A 4-bit quantized build needs 20.5 to 24.7 GB of combined RAM and VRAM, so it fits a 24 GB GPU or Mac. A 3-bit build drops to 17.2 to 19.4 GB. Unsloth keeps the 20.5B-parameter n-gram table memory-mapped from SSD.
Does Qwen4-35B-A3B match Qwen3.8-Flash-Next?
It wins 3 of the 8 benchmark scores Qwen published. It leads on DeepSWE v1.1 at 61.8 versus 58.7, but trails on FrontierCode-AA 2.0 at 16.1 versus 27.1. Qwen frames this as matching at about one-third the size.
What is the n-gram embedding table?
It is a 20.5B-parameter table at layer 2 that stores bigram and trigram patterns. It adds memory rather than per-token compute, pushing Hugging Face's total parameter count to roughly 56.8B despite the 35B main-parameter label.
How much does Qwen4-35B-A3B cost per million tokens?
OpenRouter lists two providers at $0.06 per million input tokens, $0.36 per million output tokens, and $0.003 per million cached input reads. Featherless serves BF16, while PrimeIntellect serves FP8 with a higher 65,536 max completion ceiling.
Does Qwen4-35B-A3B support a 1M context window?
Yes, both the model card and hosted endpoints list a native context window of 1,048,576 tokens for text, image, and video inputs. It uses Gated DeltaNet and sparse attention to keep long-sequence attention bounded.
Related Reading
Baidu Releases 280B ERNIE 5.5 Flash Base With 14B Active Parameters
Baidu's ERNIE 5.5 Flash Base stops at the end of pre-training: 280B total parameters, 14B active per token, 128K training context, and 1M-token inference.
Kolibri Activates Just 3.46B of Its 78.1B Parameters
Aleph Alpha’s bilingual MoE offers a 1,048,576-token context and an FP8 checkpoint designed to run on one high-memory GPU.
DeepSeek-V4.1-Flash: 890 Bytes Per Token, 437x Smaller KV Cache
DeepSeek's 552B MoE model cuts global KV cache to 890 bytes per token — 437x below V1 — using CED, CSA2, and FP4 quantization.