Skip to content

Qwen4 ships a 1M-context model that runs on a 32 GB Mac

Published Dec 04, 2026

Qwen put the Qwen4 architecture into a production release on 4 December. The model is Qwen4-35B-A3B, Apache 2.0, native text, image and video input, a 1,048,576 token context window, and day-one support in llama.cpp, MLX, vLLM, SGLang and Transformers.

The interesting part is the machine at the bottom of the ladder. According to the quantisation table in the ggml-org repository, the 4-bit build runs on a 32 GB Mac. A 35 billion parameter multimodal model with a million token window running on a laptop is not what the parameter count suggests, and the reason sits in a table of 10 million n-grams.

The release repository: Apache 2.0, image to text, and a sidebar that reads 57B params rather than 35B. Screenshot: Hugging Face.

The release repository: Apache 2.0, image to text, and a sidebar that reads 57B params rather than 35B. Screenshot: Hugging Face.

What is actually in the file

You can hand it an hour of video, a repository, or a stack of scanned pages, and it keeps the whole thing in one window instead of chunking it. The name says 35B, the checkpoint says 56B, and that difference is what decides which machine you buy. Three parts add up: 35 billion parameters in the transformer, 20.5 billion in a per-layer n-gram embedding table, and 2 billion in a multi-token prediction head. About 3.8 billion of them fire on any given token.

The transformer is 40 layers arranged in ten repeats of a four layer pattern. The first three layers of each repeat are Gated DeltaNet, a linear attention layer that folds each token into a fixed-size memory. The fourth is Qwen Sparse Attention, which looks back at individual tokens from anywhere in the window.

Mixture of experts on top: 256 routed experts, eight of them plus one shared expert per token, expert intermediate dimension 512. Around that sits a gated residual with four branches and a rank-256 bottleneck, plus an indexer with four query heads and one shared key head that scores tokens in groups of four and picks the best 512 groups, which is where the 2,048 token budget comes from. Vocabulary is 248,320, head dimension 256, RoPE dimension 64.

Hugging Face’s launch post puts the split at roughly 35B main, 3.8B active and 20.5B of n-gram parameters, about 56B in total. Screenshot: Hugging Face.

Hugging Face’s launch post puts the split at roughly 35B main, 3.8B active and 20.5B of n-gram parameters, about 56B in total. Screenshot: Hugging Face.

The table that makes a laptop work

The per-layer embedding lives in layer 2 and holds 20.5 billion parameters. Each token reads 16 rows out of it: eight encode the last two tokens, eight encode the last three, and the result is gated into the four residual streams and passed through a short convolution. Ten million rows, sixteen of them per token.

That sparsity is what the runner exploits. In the Q4_K_M build the table alone is 14.1 GB of a 36.0 GB file, and under llama.cpp’s default --lazy-mode auto it stays on disk and is read on demand instead of being held in RAM.

File size against resident memory for each quantisation, with the Mac sizes ggml-org names as minimums. The gap between the dashed outline and the solid bar is the table that stays on disk.

File size against resident memory for each quantisation, with the Mac sizes ggml-org names as minimums. The gap between the dashed outline and the solid bar is the table that stays on disk.

The numbers in that table come straight from the repository:

  • Q4_K_M: 36.0 GB file, 21.9 GB resident, 32 GB Mac
  • Q6_K: 51.0 GB file, 29.2 GB resident, 48 GB Mac
  • Q8_0: 59.4 GB file, 37.6 GB resident, 64 GB Mac
  • BF16: 111.1 GB file, 70.1 GB resident

Add the vision encoder at 903 MB, and optionally the MTP head at 1.29 GB in Q4.

The hardware panel on the GGUF repository, listing the four builds and the optional MTP sidecars. Screenshot: Hugging Face.

The hardware panel on the GGUF repository, listing the four builds and the optional MTP sidecars. Screenshot: Hugging Face.

What 1M context actually costs

A million token window is only meaningful if the cache fits too, so it is worth doing the arithmetic. Qwen4 keeps a KV cache in 10 of its 40 layers: 2 KV heads, head dimension 256, two tensors per layer, at two bytes each. That is 20,480 bytes per token, or 20 KB.

At 32K tokens the cache is 671 MB. At 128K it is 2.7 GB. At 256K, 5.4 GB. At the full 1,048,576 it is 21.5 GB in fp16, or about 10.7 GB if you quantise the cache to q8_0. The 30 linear attention layers cost almost nothing in comparison: a fixed recurrent state of roughly 30 MB, whatever the context length.

Cache growth against context length, with a 40 layer full-attention model using the same head configuration for comparison. That version would need about 86 GB at a million tokens.

Cache growth against context length, with a 40 layer full-attention model using the same head configuration for comparison. That version would need about 86 GB at a million tokens.

Put the two halves together and the 32 GB claim gets a qualifier the spec sheet does not carry. With 21.9 GB of Q4_K_M weights resident, roughly 8 GB is left for the cache, which buys about 400,000 tokens in fp16 or 800,000 with a q8 cache. Anyone who needs the whole million on a small machine is choosing between a Q6_K build on 48 GB, a q8 cache, or a shorter window than the number on the card.

Quality and speed at each quant

The repository publishes KL divergence against BF16 on 20 prompts of 512 tokens. Q4_K_M lands at 0.1252 and reproduces the BF16 model’s top token 87.9 percent of the time. Q6_K is 0.0479 and 92.9 percent. Q8_0 is 0.0359 and 94.0 percent.

Gate projections, the linear attention parameters and the depthwise convolution stay at BF16 in every build, which the maintainers say cuts KL divergence by roughly 25 to 29 percent for under one percent of file size.

On speed, the optional MTP head acts as a speculative decoder. Hugging Face ran it with three draft tokens and measured 22 percent faster generation on Apple Silicon.

Benchmarks

Qwen published twelve comparisons against Qwen3.8-Flash-Next, dense Qwen3.8-27B and Inkling 2 Mini. Against the much larger Flash-Next the result is even: six wins, six losses. Against the dense 27B it wins ten of twelve, losing GPQA and tying Chartography.

The twelve benchmark comparisons published with the release. Four of the panels cite Artificial Analysis, one cites the Mercor leaderboard, and Work360 is Qwen’s own. Chart: Qwen.

The twelve benchmark comparisons published with the release. Four of the panels cite Artificial Analysis, one cites the Mercor leaderboard, and Work360 is Qwen’s own. Chart: Qwen.

The wins over Flash-Next are DeepSWE at 61.8 against 58.7, NL2Repo at 51.7 against 48.1, AutomationBench-AA at 57.9 against 55.9, HealthBench Professional at 47.4 against 34.8, Chartography at 27.8 against 24.6 and VideoIndex at 52.9 against 51.4. The losses are Terminal Bench 4.1 at 21.2 against 24.2, FrontierCode-AA at 16.1 against 27.1, Work360 at 42.9 against 43.7, APEX Agents at 59.0 against 61.0, AA-Briefcase Elo at 1486 against 1567 and GPQA 86.9 against 91.7.

Read that as a shape rather than a score. The small model wins on code repository work, automation and health reasoning, and loses on the hardest terminal and frontier-code tasks, which is where a 3.8B active budget should lose. The health result, 12.6 points above a model three times its size, is the outlier worth checking independently before anyone plans around it.

Qwen’s announcement thread claims parity with Qwen3.8-Flash-Next at roughly a third of the size. The published table agrees on half the benchmarks. Screenshot: X.

Qwen’s announcement thread claims parity with Qwen3.8-Flash-Next at roughly a third of the size. The published table agrees on half the benchmarks. Screenshot: X.

The independent check changes one claim

Artificial Analysis ran the model through its own nine part index and published the result the same day. Qwen4-35B-A3B scores 25 on the Intelligence Index, which makes it the strongest model it has measured in the 40B to 150B class, where the median is 9.

It also puts a dent in the parity claim. On the same index, Qwen3.8-Flash-Next scores 28. So the model is three points behind the big sibling rather than level with it, and the twelve benchmark table Qwen published, where the two split six each, reads more generously than the independent one.

Artificial Analysis’s three views of the same index: the ranked bars, intelligence against active parameters, and intelligence against total parameters. Qwen4-35B-A3B sits on the active-parameter frontier and well inside the total-parameter curve. Chart: Artificial Analysis.

Artificial Analysis’s three views of the same index: the ranked bars, intelligence against active parameters, and intelligence against total parameters. Qwen4-35B-A3B sits on the active-parameter frontier and well inside the total-parameter curve. Chart: Artificial Analysis.

The comparison Artificial Analysis itself leads with is Inkling 2 Mini, which scores 20. Five points apart, at similar cost per task, and Inkling 2 Mini answers faster: 147 output tokens a second against 85 for Qwen4, with 27 seconds to first token against 68.

Cost is where the small model looks strongest. Alibaba Cloud lists $0.06 per million input tokens and $0.36 per million output, with a 95 percent cache discount, which Artificial Analysis turns into $0.55 per index task. That is against a class median of $0.30 input and $0.76 output per million.

One caveat travels with that number. Qwen4 generated 175 million tokens to complete the index, against a median of 95.9 million, and the model defaults to its xhigh reasoning effort. Much of the $0.55 is the model writing more than its neighbours, not the model being expensive per token. Set effort to high or low and both the bill and the score move.

Artificial Analysis also measures the context window at 984k rather than the 1,048,576 Qwen quotes, which is the usual gap between a configured maximum and what a harness can actually fill.

What to run, where

  • 32 GB Mac, Q4_K_M: works, with about 400K tokens of fp16 context. Enable the MTP head for the speed gain.
  • 48 GB Mac, Q6_K: 29.2 GB resident, quality much closer to BF16, and room for the full window at q8 cache.
  • 64 GB Mac or a 48 GB card, Q8_0: near lossless at 37.6 GB resident.
  • Any 24 GB card: the resident weights at Q4 leave about 2 GB, so expect a short context, not a million tokens.

The rest of the stack is standard for a model this new: llama serve -hf ggml-org/Qwen4-35B-A3B-GGUF:Q4_K_M --spec-type draft-mtp --spec-draft-n-max 3, with reasoning_effort set to off, low, high or xhigh. Qwen also points to Qwen Cloud for hosted access under the model name qwen4-35b-a3b, listed as coming soon.

Sources: Qwen4-35B-A3B model card - GGUF quantisations and the resident RAM table - Hugging Face launch post - Qwen’s announcement

Related on this site: Inkling 2 Small leads open models on the game dev board - Strata runs Flash-Next on your gaming GPU, and the numbers check out

Tokenstead community

Discuss this analysis with people running it

The Discord is where readers compare notes on the models, rigs, and prices in this piece - and where the next guide often starts.

Something wrong or stale? Send a correction.

Discussion

Be the first to comment

Start a discussion

Got a take on this, a rig to show off, or a benchmark that says otherwise? Sign up and start the thread - your comment publishes instantly once you're in.