Notes on Running Qwen4-35B-A3B on an A100 (40GB)
· 10 min read
I ran the recently released Qwen4-35B-A3B with llama.cpp on an A100 (40GB). With short prompts it puts out 86-106 Tokens/s, and prefill goes over 2000 tok/s as well.
100 tok/s!
Qwen4-35B-A3B came out right around the time I was writing this post. So here it is, the usual speed check. It's doing 100 tok/s. Once it goes over 100, it really does feel fast. Note that of the quantized models, I'm using Q6_K_XL. Going down to Q4, IQ3, IQ2 and so on should make it even faster.

With llama.cpp it's hard (for now) to get stable numbers, but when I checked with a certain tool while using it for coding assistance, it recorded the following.

Prefill (input tokens) is also an important factor, and in my measurements it peaks at around 2000-3000 tok/s, so it looks usable without frustration, coding assistance included.
One more thing: when I asked it to "make a 3D running game for kids," it built this game. I could already make games like this with Strata + Qwen3.8 Flash-Next, but the time it takes to finish (probably about a minute) feels much shorter. In the Strata days there was a lot of wasted thinking before it finished. The penalty from using an IQ3_S quantized model may have played a part, but Qwen4 35B may also simply be smarter.

Environment
- GPU: A100 SXM4 40GB
- CPU: Xeon E5-2697 v4 * 8
- Memory: 32GB
- Engine: llama.cpp
As I wrote in this post, once I started using Strata, I had to give the VM a lot of memory (about 80GB in the end). With Qwen4 35B, almost all of the processing runs in vRAM, so the memory footprint is much lighter (-50GB), which I like. Since this is a virtual environment, I can use the spare memory for other things. As for "wait, still 32GB?", I'll explain later, but it looks like about this much is needed to hold the n-gram embedding. That said, looking at the actual machine, hardly any of the 32GB is being used, so I may reduce it in the future.
llama.cpp Launch Parameters
Strata mostly took care of the parameters for me, but now that I'm back on llama.cpp, the parameters need careful tuning.
I use llama.cpp (the latest upstream, built myself with CUDA, -DCMAKE_CUDA_ARCHITECTURES=80), and the model is UD-Q6_K_XL from unsloth/Qwen4-35B-A3B-GGUF.
This is the configuration I ended up with.
./build/bin/llama-server \
-m Qwen4-35B-A3B-UD-Q6_K_XL-00001-of-00002.gguf \
-ngl 99 \
--n-cpu-moe 0 \
-c 524288 \
-np 2 \
--cache-type-k q8_0 \
--cache-type-v q8_0 \
--reasoning-effort low \
-lm mmap -lzm on -ot per_layer_token_embd=CPU \
--spec-type draft-mtp --spec-draft-n-max 2 \
--metrics \
--jinja \
--host <HOST> --port 8080 \
--api-key-file ./api-key
- -ngl 99 : Put all layers on the GPU.
- --n-cpu-moe N : Place the experts of the first N layers on the CPU (RAM) side. Along the way I experimented several times with values above 0 to put MoE in RAM, but it got slower, so I settled on 0.
- -c and -np :
-cis the total across all slots. With-np 2, the limit per request is half of-c. - --cache-type-k / --cache-type-v : The precision of the KV Cache. q8_0 halves it, and q4_0 roughly halves it again. I started with q4_0, but saw characters going missing from the input and output, so I switched to q8_0.
- --reasoning-effort low : The reasoning effort passed to the chat template. I want answers fast, so I set it to
low. - -lm mmap -lzm on -ot per_layer_token_embd=CPU : Load options recommended on the Unsloth page.
- --spec-type draft-mtp --spec-draft-n-max 2 : Speculative decoding using the MTP head that ships in the GGUF (apparently; this is also from the Unsloth page).
- --metrics : Enables the Prometheus-format
/metricsendpoint. - --jinja : Use the chat template that comes with the model.
- --api-key-file : Read the API key from a file. Both
x-api-keyandAuthorization: Bearerwork.
With this setup, the 40GB of vRAM is almost fully used.
So far, the personal win for me is being able to raise the KV Cache to 512K (with -np 2, each prompt gets half of that).
Qwen 3.8 topped out at 256K to begin with, and I hit that limit fairly often during coding assistance, so the increase is very welcome.
Impressions of Qwen4-35B-A3B
Some loose impressions.
- Not only is it faster than Qwen3.8-27B, the previous model I used in this post, but I also managed to increase the KV Cache, which felt like a big constraint back then.
- Unlike Strata, everything, including the model and the KV Cache, fits in vRAM, so the VM needs far less CPU and memory, which makes me happy.
- With a "35B" label, you might worry about quality compared with today's 100B+ models, but its accuracy seems to be high.
- Apart from the 35B, it apparently has a separate lookup table called the n-gram embedding, worth 20B, which needs about 20GB of space outside vRAM. I've seen it described as "effectively 50B" (?), so it seems this lets it keep quality up while also delivering high speed.
- To fit all 35B in vRAM, 6-bit seems to be the limit for quantization on my machine.
I've been burned by quantization when testing past models, so I'll keep checking whether 6-bit is good enough.
What About Maya?
I tried Maya in the previous post, but it faded fast once Qwen4 appeared.
- I kept trying Maya-S afterwards, but its accuracy when running tools was abnormally low
- With Maya-M, input token speed dropped even more sharply than output (500 tok/s)
- With a combination like mine, a "fast GPU" and a "slow CPU", performance inevitably suffers once more of the load shifts to the CPU.
- Conclusion: I need more money.
Summary
Qwen4-35B-A3B runs on an A100 (40GB). I'll make it my main engine for a while. I'm looking forward to seeing whether it or Strata comes out ahead. Maya goes to sleep for now.