Skip to content
senn-techsenn-tech
Back to blog
AI Hardware
Local AI and GPU hardware2026-12-04· By Franz Senn

Qwen4-35B-A3B in self-hosted operation: file sizes, context math, CPU numbers

On December 4 the Qwen team released Qwen4-35B-A3B on Hugging Face, the first open-weights model of the Qwen4 series, under Apache-2.0. It is a multimodal mixture-of-experts model with image and video input, one million tokens of native context, and an architecture built for self-hosting. We read the file sizes of the distributed checkpoints off the Hugging Face API on release day and ran the model on a plain CPU server.

Qwen4-35B-A3B is the first open model of the Qwen4 series: a multimodal mixture-of-experts with roughly 35 billion main parameters, about 3 billion active per token, plus a 20.5-billion-parameter N-gram embedding table and a 2-billion-parameter MTP head. Inputs are text, image and video, context is 1,048,576 tokens natively, the license is Apache-2.0.

Qwen wordmark
Qwen4-35B-A3B is the first open model of the series; Qwen4-Max is not listed as an open model on the card. (Quelle: Alibaba Cloud / Wikimedia, CC0)

The layout: 30 linear layers, 10 real attention layers

We know this architecture in-house from Qwen3.8-Flash-Next. Qwen4-35B-A3B brings it in a size that gets interesting for mid-size company servers. The model card describes 40 layers in ten blocks: three Gated DeltaNet layers with fixed-size state, then one Qwen Sparse Attention layer, with a mixed residual stream after every attention and MoE stage. In the sparse attention a small indexer picks groups of four tokens, up to 512 groups per query, about 2,000 tokens, instead of the whole context. The MoE block has 256 experts and keeps 8 active plus 1 shared expert per token.

On top sits the N-gram embedding table in the second layer: 10 million rows, 20.5 billion parameters, 16 rows read per token. The table costs almost no compute, it costs space, and that space decides which card can run the model.

One token through the modelN-gram tablelayer 2: 16 rows read out of10 millionDeltaNet x3fixed state, no KV-cacheSparse attentionindexer picks up to 2,048tokensMoE8 of 256 experts plus 1sharedMTP headproposes 3 tokens, mainmodel checks
Four layers per block, ten blocks. Only the sparse-attention layers (10 of 40) keep a KV-cache. (Quelle: Qwen model card of December 4, 2026; the number three drafts from the vLLM blog)

What the weights weigh: measured on release day

The model card lists no file sizes. On the early morning of December 4 (UTC) we read the file listings of the official checkpoints and of the GGUF conversions through the Hugging Face API. Sizes in gigabytes (1 GB = 10⁹ bytes), main model and N-gram table as laid out per file, MTP head as noted in the fourth column:

CheckpointWeightsN-gram tableMTP head
BF16, official (vLLM figures)72.741in checkpoint
FP8, official (vLLM figures)39.720.5in checkpoint
GGUF BF16, ggml-org111.1in one file+3.8
GGUF Q8_0, ggml-org59.4in one file+2.0
GGUF Q6_K, ggml-org51.0in one file+1.3 (Q4_K_M)
GGUF Q4_K_M, ggml-org36.0in one file+1.3
GGUF UD-IQ1_M, unsloth22.3table in shard 2+2.0 (Q8)

Unit: gigabytes. Measured 2026-12-04 on file sizes from the Hugging Face API (ggml-org and unsloth repositories), official rows per the vLLM blog. The BF16 and FP8 rows are the split published in the vLLM blog the same day; the GGUF sizes are our own reading. MTP head: part of the model in the official checkpoints, a separate file in the GGUF rows, needed for speculation.

The table explains the number that went around wrong on release day: the model is called 35B, yet its files are bigger. The N-gram table (20.5 billion parameters) ships inside every file. The gap between 3 billion parameters computed per token and 56 billion stored is exactly the trick: cheap compute steps, expensive storage.

Distributed file sizes in gigabytesGGUF BF16 (ggml-org)111BF16 official (vLLM)114FP8 official (vLLM)60GGUF Q8_059GGUF Q6_K51GGUF Q4_K_M36UD-Q3_K_XL (unsloth)31UD-IQ1_M (unsloth)220120
Our own reading from the Hugging Face API on 2026-12-04; the official rows follow the split in the vLLM blog; the bars 114 and 60 are sums of that split, derived. The official rows include the MTP head, the GGUF MTP files are not counted. (Quelle: senn-tech, own measurement December 4)

vLLM on day one: one million context on one card, vendor numbers

The vLLM blog of release day reports day-0 support on NVIDIA Blackwell and Hopper, AMD MI350X/MI355X and Alibaba's Zhenwu accelerators, with the Docker images vllm/vllm-openai:qwen4 for NVIDIA and vllm/vllm-openai-rocm:qwen4 for AMD. The three numbers that matter for operations are vendor claims from vLLM, we did not reproduce them: on a single B300 the FP8 checkpoint generates 514 tokens per second at one request; at four concurrent requests each single request still gets 336 (SPEED-Bench prompts, MTP with 3 drafts). The N-gram table lives in pinned host memory there, 20.5 GB. And the million-token context costs 8 GiB with an NVFP4 cache; with full attention in BF16 it would have been 80 GiB. The NVFP4 cache is not a side trick: per vLLM the model is trained to expect an NVFP4 KV-cache.

vLLM logo
vLLM keeps the N-gram table in pinned host memory and stores the sparse-attention cache in NVFP4. (Quelle: Simple Icons (repo CC0), trademark: vLLM)

Our own measurement: llama.cpp on a CPU server

The interesting question for a server room without accelerators: does the model run on CPU alone? Support merged into llama.cpp on December 3 at 18:18 UTC (PR 33626); we used the b12973 build from the release page. The file is unsloth's UD-IQ1_M at 22.3 GB, the smallest quantization that still reads as usable. The machine: a virtual Linux server with 12 vCPUs of an AMD EPYC 7F52 (Zen 3), 60 GB of RAM, no GPU, CPU-only inference on 12 threads. llama-bench with three repetitions:

Benchmark runResult
Prompt processing 512 tokens, 12 threads65.4 tokens/s
Prompt processing 2048 tokens, 12 threads60.8 tokens/s
Text generation 32 tokens, 12 threads7.2 tokens/s (spread ± 2.4)
Text generation 128 tokens, 12 threads9.3 tokens/s (spread ± 0.1)

Unit: tokens per second. Measured 2026-12-04. Machine: VPS with 12 vCPUs AMD EPYC 7F52 (Zen 3), 60 GB RAM, Ubuntu 26.04, llama.cpp b12973, model UD-IQ1_M (22.3 GB), CPU only (ngl 0), flash-attention off, MTP head not loaded. Mean of three repetitions.

Two things about these numbers. First: 65 tokens per second reading a prompt, 9.3 writing, all without any GPU. A MoE with 3 active billion parameters behaves on a CPU like a small dense model; the 22 GB sit in system RAM and are read only in parts during generation. The short 32-token run is the noisy one (± 2.4). Second: this is IQ1, one of the strongest quantizations on the list. It shows feasibility and speed. We did not test the quality of this quantization, and for answers in business use it is no basis.

llama.cpp b12973, CPU only, UD-IQ1_M: tokens per secondPrompt 512 (12 threads)65.4Prompt 2048 (12 threads)60.8Generation 128 tokens9.3Generation 32 tokens7.2070
Our own measurement, 2026-12-04, 12 vCPUs EPYC 7F52, 60 GB RAM, ngl 0, no MTP head, mean of three runs. (Quelle: senn-tech, own measurement December 4)

What this means for your own stack

The 36 GB of the Q4_K_M file are the crux. A current 32 GB card does not hold the weights; the file overflows before a single token of context is allocated. Three ways out, in our order of taste: two cards, stronger compression to UD-IQ3_XXS (28.7 GB, about 30.7 GB with the MTP head: fits a 32 GB card, tightly), or the table into system RAM. The third route is what we have been running in-house for weeks on the architectural predecessor: our production lane serves with the N-gram table in CPU memory (--engram-config {"cpu_offload": true}), KV data in FP8, plus multi-token prediction with 2 drafts. For Qwen4-35B-A3B in FP8 with its 20.5 GB table on the host we lack the space today: the inference server with four cards reports 6 GB available from free on December 4. The FP8 checkpoint runs on that machine once the memory upgrade is through; the investment is not decided yet.

For agent and document scenarios the million-token context is the real reason to remember this model. Serving runs over the usual chat-completions interfaces, tool calls go through the qwen4 parser in vLLM. To dose the thinking, set reasoning_effort to xhigh, high or low; enable_thinking: false turns it off. The license is Apache-2.0 without usage limits; the series flagship, Qwen4-Max, is not listed as an open model on the card; Qwen announces it on its own blog. On the active parameter count: the model card says "3B activated", the Hugging Face blog says "~3.8B active parameters per token". We compute with the smaller number and measure.

Hugging Face logo
Hugging Face reported day-one support on release day: Transformers, llama.cpp, vLLM, SGLang, MLX, own endpoints. (Quelle: Simple Icons (repo CC0), trademark: Hugging Face)

Which vendors merged Qwen4 code before the weights arrived, we logged on December 1: Qwen4 in the engines. More measurements on running models in your own building, from KV-cache arithmetic to GPU comparisons, live in the topic Local AI and GPU hardware. And if an operation like this should enter your server room, wired into your systems: AI on your own hardware.

Further sources

The CPU measurement ran on a virtual server of our in-house infrastructure (12 vCPUs EPYC 7F52, 60 GB RAM); model cards and API size reads on 2026-12-04, early morning UTC. vLLM numbers are vendor claims, not reproduced. Our own quality measurement of the quantizations: open.

Questions?
Does Qwen4-35B-A3B run on a single GPU?+

Not with the official Q4_K_M quantization: the ggml-org GGUF measures 36 GB, and a current 32 GB card is 4 GB short before a single token of context is allocated. Workable routes are two cards, a stronger compression to UD-IQ3_XXS (28.7 GB), or offloading the N-gram table to system RAM, which vLLM does by default for the FP8 checkpoint.

What is the N-gram embedding table and why does it live in system RAM?+

In the second decoder layer the model looks up small groups of bigrams and trigrams for each token in a table of 10 million rows with 2048 values each. That is 20.5 billion parameters, of which a token reads only 16 rows. Because the access pattern is sparse, vLLM keeps the table in pinned host memory and frees 20.5 GB on the GPU.

Does the 1 million token context cost a lot of memory?+

Far less than on a full-attention model here. Only 10 of the 40 layers keep a KV-cache; the 30 Gated DeltaNet layers hold a fixed-size state per sequence. vLLM puts one million tokens of context at 8 GiB with an NVFP4 cache, and says full attention in BF16 would have needed 80 GiB. Those are vendor numbers from December 4, we did not reproduce them.

Does the model run on a laptop?+

On the Mac yes: Hugging Face lists the oMLX path for day one and says official mlx-lm support is on its way, and reports 22 percent faster generation via the MTP head on an M5 system with the Q4 file. On Windows laptops the 36 GB Q4 file is too big for 16 GB of video memory, and the 22 GB IQ1 file exceeds the system RAM of typical machines.