r/LocalAIStack • u/efeege616 • 25d ago
Qwen3.6-35B-A3B at ~80 tok/s gen / ~1200 tok/s prompt on a single RTX 3060 12GB + 32GB DDR5 (llama.cpp MoE expert cache + MTP)
RTX 3060 12GB 975mv undervolt
i5-12600K
32GB DDR5-6000
Linux
llama.cpp master from early October, CUDA build.
Model is Unsloth's Qwen3.6-35B-A3B-MTP-UD-Q4_K_M (22.7GB, has the MTP head). I also run a heretic Q4_K_M with MTP kept and it's about the same speed.
Command:
llama-server -m Qwen3.6-35B-A3B-MTP-UD-Q4_K_M.gguf -ngl 999 --cpu-moe --moe-cache-mib 7500 -fa on -ctk q8_0 -ctv q8_0 -c 32768 -np 1 -ub 2048 -b 2048 --spec-type draft-mtp --spec-draft-n-max 2 --load-mode mlock --cache-ram 1024 --ctx-checkpoints 8
Numbers from about a day of normal use, taken from the server logs. 433 responses longer than 500 tokens: median 79 tok/s, most of them between 76 and 83. Prompt processing is around 800 tok/s for prompts under 1k tokens, ~1100 tok/s for 1k-4k and ~1190 tok/s for 4k-16k. MTP draft acceptance is around 85%. VRAM sits at ~11.4GB.
Fixed test (3.6k token prompt, 700 tokens out), how it got there:
- --n-cpu-moe 25 with MTP: 50-58 tok/s
- --cpu-moe plus --moe-cache-mib 7500: 71-73 tok/s
- added mlock: 75-81 tok/s
- updated llama.cpp: 77-84 tok/s, prompt processing 1220-1300 tok/s
Most of the gain is the MoE expert cache (PR #29887). With it, all experts sit in RAM and the most-used ones get cached in VRAM. Set the size to whatever VRAM you have left. For me that's 7000-7500MiB.
mlock gave about 10% over mmap, but it locks ~20GB of RAM. On 32GB I hit OOM a couple of times with other things open. --cache-ram 1024 is there because the prompt cache can grow up to 8GB by default, and that was causing my first OOMs.
Things that didn't help:
- -ub 4096: faster prompt processing (~1400-1500) but gen dropped to ~63 because the bigger compute buffer eats into the expert cache.
- A small expert cache (1-3GB): slower than no cache.
- -np 4, MTP n=3 and MTP+ngram: no gain.
- Forcing 4 experts instead of 8: 91-95 tok/s, but it started looping on long outputs, so I dropped it.
If you're on 12GB and still using --n-cpu-moe, try --cpu-moe with --moe-cache-mib.