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.

gif_1.gif

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.

img_1.png

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.

gif_2.gif

Environment

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

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.

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.

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.