Alibaba's Qwen4-35B-A3B Fits a 1M-Token Multimodal Model in 21.9 GB of RAM
Alibaba's Qwen4-35B-A3B runs a 1M-token multimodal model with 21.9 GB of resident RAM on a 32 GB Mac, using on-disk embeddings and a 3.8B-active-parameter MoE design.
By Grace Kim
4 min read

What's News
- Qwen4-35B-A3B was released under Apache-2.0 on December 4, 2026, with a 1M-token context window
- The Q4_K_M quantization needs 21.9 GB of resident RAM on a 32 GB Mac via on-disk embedding reads
- The MoE design activates 3.8B of ~56B total parameters per token
- Three draft tokens raised generation speed 22% on an Apple Silicon M5 in Hugging Face's test
- On 12 CyberDefense Bench tasks, update-50 passed 6 while update-100 passed 3, despite rising training reward
A 56-billion-parameter multimodal model can now run on a 32 GB Mac with just 21.9 GB of resident RAM. That's the headline number from Alibaba's Qwen Team, which released Qwen4-35B-A3B under Apache-2.0 on December 4, 2026, per Hugging Face's announcement.
The model accepts text, images and video, and outputs text across a native one-million-token context window. Hugging Face reported launch support across transformers, llama.cpp and Llama App, vLLM, SGLang and MLX, with BF16, FP8, OMLX and GGUF checkpoints.
How does a 35B model shrink to 3.8B per token?
The architecture splits what's stored from what's computed. Roughly 35 billion main parameters combine with about 3.8 billion active parameters per token, thanks to a mixture-of-experts design with 256 routed experts — eight activated per token, plus one shared expert.
A separate 20.5-billion-parameter n-gram embedding table brings the total to about 56 billion. The table performs 16 lookups per token for two- and three-token patterns, and can be read on demand rather than loaded into RAM. That's the trick that puts the model on consumer hardware.
The official model card describes 40 layers arranged as ten repetitions: three Gated DeltaNet layers followed by one Qwen Sparse Attention layer. Gated DeltaNet updates a fixed-size memory as each token arrives. Sparse attention groups tokens into blocks of four, selects up to 512 blocks, and gives each query a 2,048-token budget. A vision transformer encodes images as patches and processes video at two frames per second, feeding visual tokens into the text decoder.
Takeaway: the model keeps its full checkpoint on disk while paying compute costs closer to a small model.
What does local deployment actually require?
The GGUF repository lists concrete footprints when llama.cpp's default lazy mode keeps the embedding table on disk:
- Q4_K_M: 36.0 GB file, 21.9 GB resident RAM, 32 GB Mac
- Q6_K: 51.0 GB file, 29.2 GB resident RAM, 48 GB Mac
- Q8_0: 59.4 GB file, 37.6 GB resident RAM, 64 GB Mac
For high-throughput production, the Qwen Team recommends dedicated serving engines such as SGLang and vLLM. llama.cpp and Apple Silicon options cover local deployments.
Speed has a lever too. An optional multi-token prediction head generates drafts for speculative decoding and ships separately to keep base downloads compact. Hugging Face reports that enabling three draft tokens increased generation speed by 22% in its Q4 quantization test on an Apple Silicon M5. On Apple Silicon, oMLX adds custom Metal kernels for sparse attention and gated residual connections, supports image input and multi-token prediction, and can offload the embedding table to SSD.
Can you turn reasoning down without losing quality?
Yes, but carefully. Reasoning effort is adjustable — xhigh, high, low or off, with high as default. The Qwen Team cautions that lower effort doesn't always shorten multi-turn agent tasks. Faster per-turn responses can bring insufficient analysis, more failures and repeated retries, which may increase total latency and token consumption.
The fine-print lesson: speed settings are a tradeoff, not a free win.
What did the security fine-tuning example show?
The announcement includes a TRL training example for security-alert triage. vLLM samples several responses to each sanitized alert, and each response earns a reward of 1 when its triage label and evidence citations match analyst criteria, or 0 otherwise. TRL's asynchronous GRPO trainer then updates a LoRA adapter, with vLLM serving on one GPU and training on the other.
The held-out results cut against the training curve. On 12 CyberDefense Bench tasks, the base model passed 4, the update-50 adapter passed 6 and the update-100 adapter passed 3. The update-50 checkpoint performed best even as average training reward trended upward. Additional training did not produce a corresponding improvement on held-out tasks.
Higher reward didn't buy better security triage — a caution for anyone equating the two.
For local AI adoption, the release ties feasibility to specific memory and framework choices. The training example, meanwhile, treats held-out task performance as a measure separate from training reward — a distinction worth watching as these models move onto more desks.
Source: unite.ai
More from Grace Kim
Show full bio
Market editor covering people, launches and day-to-day practice in entrepreneurship, startups and venture funding at Business Bearings.
3,177 articles