Qwen4-35B-A3B at 30 tok/s on an 8 GB RTX 3070 Ti with llama.cpp
- Hardware
- RTX 3070 Ti with 8GB of VRAM
32GB of RAM - Models & engines
- llama.cpp CUDA build, b12977
Model: Qwen4-35B-A3B Unsloth UD-Q4_K_M, with an Unsloth MTP Q8_0 draft - Key gotcha
- Moving MoE experts onto the 8 GB GPU dropped speed to 5.16 tok/s because RAM ran out and the system thrashed
What they built
8GB Lab tested how fast Qwen4-35B-A3B (35B total parameters, 3B active per token) could run on an RTX 3070 Ti with 8 GB of VRAM and 32 GB of RAM, using a CUDA build of llama.cpp, without buying hardware or shrinking the model.
Every condition used the same reasoning prompt with a known answer (92), averaging three 200-token runs at temperature 0, and changed one setting at a time across three phases.
Setup
- RTX 3070 Ti with 8GB of VRAM
- 32GB of RAM
- llama.cpp CUDA build, b12977
- Model: Qwen4-35B-A3B Unsloth UD-Q4_K_M, with an Unsloth MTP Q8_0 draft
How it works
- Final configuration: -fa on, -ngl all -cmoe --fit on, MTP draft at n-max 1
- MTP at n-max 1 gave the biggest single gain
- The Unsloth UD quant was slower alone but faster than the ggml quant once MTP was on
Results & numbers
- Baseline 26.46 tok/s; final combined setup 30.43 tok/s
- MTP acceptance was 0.90 to 0.93 at n-max 1, 0.76 at n-max 2, 0.55 at n-max 3 and 0.38 at n-max 4
- Long-prompt processing reached about 301 tok/s, and the answer stayed correct
Gotchas
- Moving MoE experts onto the 8 GB GPU dropped speed to 5.16 tok/s because RAM ran out and the system thrashed
- Quantizing the KV cache to q8_0 was 8.4% slower here
- Changing thread counts made it slower; the default was already best
“Wrong predictions waste the compute spent on them”— 8GB Lab
Do it yourself
- Pick one fixed prompt with a known answer and measure the baseline
- Run with -ngl all -cmoe so experts stay in RAM
- Add MTP drafting at n-max 1 and compare
- Try flash attention and the Unsloth MTP Q8_0 draft
- Keep only changes that beat the previous run
Similar setups
A custom CUDA runtime that runs a local Qwen coding model 2.7x faster on an 8 GB RTX 4060
Omer Chandna wrote qwen-coder-kernel, a CUDA runtime for a 4-bit Qwen3.8 9B with an OpenAI-compatible server for OpenCode, and measured 119 tok/s against llama.cpp's 44 on his 8 GB RTX 4060 with the same output.
Qwen4-35B-A3B as a daily local agent model on a 12 GB RTX 3060
Jeena runs Qwen4-35B-A3B with llama.cpp on an RTX 3060 (12 GB) and 32 GB of RAM, tuned to about 71 tokens/s, and uses it for errands, a browser guitar tuner, CalDAV todos and API checks.
Faster local Qwen on an AMD eGPU with the llama-cpp-rdna-boosts patches
A developer running a Qwen3.8-27B fine-tune on an AMD R9700 eGPU swapped vanilla llama.cpp for a small set of AMD-specific patches in a Podman image and roughly doubled prefill speed.
Predicting MoE experts for a 35B model on an 8 GB laptop, and why it didn't speed anything up
Oyama Mahiro built a lookup-table predictor for which experts a local Qwen3.6 35B MoE model needs next, wired it into llama.cpp, and found the hit rate rose while decode speed did not.