32.9GB at 4-Bit, 22% From MTP, and an Open CUDA Crash: Running Qwen4-35B-A3B in llama.cpp on 8GB to 32GB Cards
- Get link
- X
- Other Apps
Local AI · Analysis
llama.cpp v1.1.1 added Qwen4-35B-A3B on Dec 4, 2026 alongside lazy disk loading for its 20B n-gram table and multi-token prediction sidecars. A 16GB GPU with expert offload avoids a $4,000 to $5,700 VRAM cliff while CUDA users wait on issue #33673.
By The Benchmarque Staff · · Updated Dec 6, 2026 · 8 min read
GGUF shard totals come from ggml-org on Hugging Face; flags from llama.cpp's server README; MTP gains from Hugging Face's Dec 4 Qwen4 post; CUDA crash reports and user speeds from llama.cpp issue #33673; Qwen Cloud rates from qwencloud.com; and US in-stock GPU prices from Tom's Hardware's Dec 3, 2026 tracker. Ratios, $/GB and API breakeven totals are calculated from those figures.

Qwen4-35B-A3B in llama.cpp in 4 cards
Official 4-bit GGUF
32.9GB
Q4_K_M is 4.1GB smaller than Ollama's 37GB file; 34.0GB with Q4_0 MTP sidecar.
MTP speed gain
+22%
Measured on Apple M5 Q4 (3 drafts); CUDA depth 1 users report +16% to +20%.
16GB to 32GB jump
+$5,700
RTX 5060 Ti 16GB ($799) vs. RTX 5090 ($6,499, $203.09/GB); 18.05B API tokens.
Open CUDA crash
Depth 2+
Illegal memory access at draft depth 2+; hold --spec-draft-n-max 1 on NVIDIA.
Run Qwen4-35B-A3B on llama.cpp v1.1.1 or newer with the 32.9GB ggml-org Q4_K_M GGUF (4.1GB smaller than Ollama's 37GB download) and a 16GB GPU ($721 to $799) using --cpu-moe plus a fast SSD. Because llama.cpp streams the 20B per-layer n-gram table lazily from disk (reading 16 rows per token), stepping up to a $4,799 RTX 4090 or $6,499 RTX 5090 adds $4,000 to $5,700 and requires 13.3 billion to 18.1 billion output tokens to break even against Qwen Cloud's $0.36/M output rate. On NVIDIA GPUs, cap MTP at --spec-draft-n-max 1 until issue #33673 fixes depth-2+ crashes.
What do the official ggml-org GGUF files weigh?
The ggml-org Q4_K_M build totals 32.9GB across three shards, saving 4.1GB against Ollama's 37GB package while keeping the 20B PLE table at IQ4_NL.
| File (ggml-org/Qwen4-35B-A3B-GGUF) | Total size | Packaging notes from model card |
|---|---|---|
| Q2_K (3 shards) | 27.9GB | Routed gate/up at Q2_K, routed down at Q4_K; PLE IQ4_NL |
| Q4_K_M (3 shards) | 32.9GB | No imatrix; PLE IQ4_NL (4.1GB smaller than Ollama 37GB) |
| Q8_0 (3 shards) | 49.0GB | No imatrix; PLE IQ4_NL |
| MTP sidecar (Q4_0 / Q8_0 / BF16) | 1.09 / 2.01 / 3.76GB | Single MTP layer (34.0GB combined with Q4_K_M + Q4_0) |
| Vision projector (mmproj, Q8_0) | 614MB | Needed only for image and video inputs |
Shard sums from Hugging Face on Dec 5, 2026 (Q4_K_M: 10.9MB + 28.0GB + 4.9GB). Hugging Face's launch blog cites a Q6_K command, yet no Q6_K build existed in ggml-org on Dec 5. Under --lazy-mode auto, tensors over 4 GiB read on demand from disk (16 PLE rows per token), so exact resident RAM is smaller than 32.9GB but unpublished.
Which llama.cpp flags control MoE offload and MTP?
Update to llama.cpp v1.1.1 (PR #33626) and start with --cpu-moe on 8GB to 16GB cards or --n-cpu-moe N across the model's 40 layers on 24GB to 32GB GPUs.
| Flag | Documented behavior | Qwen4-35B-A3B setting |
|---|---|---|
-cmoe, --cpu-moe | Places all MoE expert weights in CPU RAM | 8GB to 16GB cards: keeps attention and shared layers on GPU |
-ncmoe N, --n-cpu-moe N | Offloads MoE weights of first N layers to CPU | 24GB and 32GB cards: raise N (of 40 layers) until load fits |
-ot, --override-tensor | Overrides buffer type by tensor regex | Issue #33673 reporter pins PLE via per_layer_token_embd=CPU |
--spec-type draft-mtp, --spec-draft-n-max N | Speculative decoding using MTP sidecar | N=3 on Apple Silicon; cap at N=1 on CUDA for now |
-np, --parallel N | Server slot count (default auto) | 1 for single user; CUDA crashes occurred on 1 and 2 slots |
-ctk, -ctv | KV cache type (default f16; q8_0, q4_0) | Quantize KV cache for long contexts on 8GB to 16GB GPUs |
Reference command from Hugging Face: llama serve -hf ggml-org/Qwen4-35B-A3B-GGUF:Q4_K_M --spec-type draft-mtp --spec-draft-n-max 3 (change final value to 1 on NVIDIA CUDA).
What does MTP add, and how severe is CUDA issue #33673?
Hugging Face measured +22% throughput on an Apple M5 (3 draft tokens), while CUDA issue #33673 crashes at depth 2+ yet stays stable with a reported +16% to +20% gain at depth 1.
| MTP setting (issue #33673: 2 slots, ~8K ctx, 3 CUDA GPUs) | Reported speed | Draft acceptance | Outcome |
|---|---|---|---|
| No MTP | 84.7 / 76.3 tok/s | Baseline (no draft) | Stable |
| MTP, 1 draft token | 101.5 / 88.7 tok/s (+16% to +20%) | 0.909 / 0.924 | Stable |
| MTP, 3 draft tokens | 105.0 / 110.0 tok/s | 0.743 / 0.620 | Crashed in round 3 |
User-reported figures from GitHub issue #33673 (not official Qwen or llama.cpp tests). Dec 5 MTP builds b13004 (#33702) and b13005 (#33778) did not mention the bug. Windows RTX 4090 comments on 1 slot logged 7 of 29 crashes at depth 3 vs. 0 of 16 at depth 1 (~183 tok/s, 87% acceptance on captioning); a proposed src/llama-context.cpp fix passed 24 of 24 turns unmerged.
How do GPU VRAM tiers compare against Qwen Cloud API economics?
Jumping from a $799 16GB NVIDIA card to a $6,499 RTX 5090 adds $5,700 in capital cost, equivalent to 18.05 billion output tokens on Qwen Cloud ($0.36/M output).
| VRAM | Cheapest in-stock card | Price | $/GB | NVIDIA option | API output breakeven |
|---|---|---|---|---|---|
| 8GB | Intel Arc A750 | $349 | $43.63 | RTX 5050 ($419, $52.38/GB) | 0.97B / 1.16B tok |
| 12GB | Intel Arc B580 | $616 | $51.33 | RTX 5070 ($799, $66.58/GB) | 1.71B / 2.22B tok |
| 16GB | Intel Arc A770 16GB | $721 | $45.06 | RTX 5060 Ti 16GB ($799, $49.94/GB) | 2.00B / 2.22B tok |
| 24GB | GeForce RTX 4090 | $4,799 | $199.96 | GeForce RTX 4090 | 13.33B tok |
| 32GB | GeForce RTX 5090 | $6,499 | $203.09 | GeForce RTX 5090 | 18.05B tok |
GPU prices: Tom's Hardware US in-stock tracker (Dec 3, 2026); cheapest 16GB Radeon was RX 9060 XT 16GB at $739 ($46.19/GB). API breakeven divides GPU sticker by Qwen Cloud's $0.36/M output rate ($0.06/M input, $0.003/M cache read), excluding electricity. On a 4:1 blended workload ($0.12/M), $6,499 equals 54.16 billion tokens.
What is verified vs. what remains unverified?
Separating official package specs from user-filed bug threads prevents overbuying VRAM on incomplete speed data.
- Verified from primary docs: Apache-2.0 architecture (35B MoE, 3B active / HF ~3.8B active, 40 layers, 256 experts, 20B PLE table, 2B MTP, 1M context), exact ggml-org GGUF shard sums (27.9GB / 32.9GB / 49.0GB), Ollama 37GB Q4_K_M, llama.cpp v1.1.1 PR #33626, Dec 5 builds b13004/b13005,
--lazy-mode auto(>4 GiB), HF M5 +22% MTP gain, Qwen Cloud $0.06/$0.36 rates, and Tom's Hardware Dec 3 GPU tracker prices. - User-reported in issue #33673: CUDA illegal memory access at draft depth >=2, 3-GPU speed table (+16% to +20% at depth 1), RTX 4090 single-slot crash rates (7/29 at depth 3, 0/16 at depth 1) and ~183 tok/s captioning speed, plus unmerged
src/llama-context.cpppatch stability. - Unpublished or unverified: Exact byte share of the 20B PLE table inside the 32.9GB Q4_K_M file, official RTX tokens-per-second figures, and Vulkan/SYCL/HIP Qwen4 benchmarks on Intel Arc or AMD Radeon GPUs.
The verdict
Best local value setup: pair llama.cpp v1.1.1+ with the 32.9GB ggml-org Q4_K_M file, the 1.09GB Q4_0 MTP sidecar, a fast NVMe SSD, ample system RAM and a 16GB GPU ($721 to $799) using --cpu-moe.
NVIDIA CUDA users: keep --spec-draft-n-max 1 for a reported 16% to 20% speed lift without tripping issue #33673 crashes until a fix merges.
Buyers weighing 24GB or 32GB cards strictly for Qwen4: skip the $4,000 to $5,700 VRAM premium unless offline privacy requires it; Qwen Cloud serves 13.3 billion to 18.1 billion output tokens for the card sticker alone.
The catch: no official RTX, Radeon or Arc throughput benchmarks exist for Qwen4-35B-A3B, and true resident memory depends on an unpublished PLE table byte split.
Quick answers
Why is Qwen4-35B-A3B's 32.9GB Q4_K_M file smaller in RAM than on disk?
The file includes a 20B per-layer n-gram embedding (PLE) table stored at IQ4_NL. Under llama.cpp's default --lazy-mode auto, tensors larger than 4 GiB load on demand from disk (reading 16 rows per token) rather than staying resident in RAM, though the exact resident byte split is unpublished.
What MTP setting avoids the NVIDIA CUDA crash in llama.cpp?
Keep --spec-draft-n-max 1 alongside --spec-type draft-mtp on CUDA GPUs. Issue #33673 users report illegal memory access crashes at draft depth 2 or higher, while depth 1 ran cleanly with a reported 16% to 20% speedup.
Why is the ggml-org Q4_K_M download smaller than Ollama's build?
The three official ggml-org Q4_K_M shards sum to 32.9GB (10.9MB + 28.0GB + 4.9GB), which is 4.1GB smaller than Ollama's 37GB Q4_K_M package; adding the Q4_0 MTP sidecar (1.09GB) brings the ggml-org total to 34.0GB.
Is an RTX 5090 worth $6,499 strictly to run Qwen4-35B-A3B locally?
Not on raw token economics alone: at Qwen Cloud's $0.36 per million output rate, $6,499 pays for 18.05 billion output tokens (or 54.16 billion tokens on a 4:1 input/output mix), whereas a $799 RTX 5060 Ti 16GB with --cpu-moe saves $5,700 upfront.
Compare local AI GPUs and unified-memory hosts
Compare local LLM speeds and GPU $/GB on The Benchmarque
Read next: Qwen4-35B-A3B: 3B Active, 1M Context and Benchmarks · DGX Spark vs. a 128GB Mini PC · Best GPU for Local AI
Publishing reproducible local-LLM inference benchmarks or hardware specs? Submit verified telemetry or sponsorship inquiries at thebenchmarque.com/advertise.
Sources
- ggml-org: Qwen4-35B-A3B-GGUF model card and file list huggingface.co
- Qwen: Qwen4-35B-A3B model overview huggingface.co
- Hugging Face: Qwen4 launch post (Dec 4, 2026) huggingface.co
- llama.cpp: server README (flags and lazy loading) github.com
- llama.cpp: releases v1.1.1, b13004, b13005 github.com
- llama.cpp issue #33673: CUDA illegal memory access with draft-mtp depth 2 or more github.com
- Ollama: qwen4 tags and download sizes ollama.com
- Qwen Cloud: Qwen4-35B-A3B API pricing qwencloud.com
- Tom's Hardware: lowest GPU prices tracker (updated Dec 3, 2026) tomshardware.com
Comments
Post a Comment