I'm curious about speed and memory use for Qwen4-35B-A3B on the 32 GB AMD AI PRO R9700. Is there much benefit to quantizing the KV cache, and how do the inference engines compare?
How well does 4-bit Qwen4 35B run on a single R9700?
Answers
At 64K context, the reported Radiance 2.5.0 test makes a good case for trying BF16 KV first if it fits. Combined decode was 213.3 tokens per second with BF16 versus 215.8 with i8. Held VRAM was 25.27 GiB versus 22.54 GiB, so the speed difference was small but the memory difference was about 2.7 GiB.
Prefill was also close, though i8 was faster at 64K. The test used a single stream, stock clocks, 4-bit weights and speculative decoding at depth 2. That result doesn't establish how much memory or speed either cache setting would need at a much longer context.
Reply to this answer
The engine comparison is striking, but it isn't a clean apples-to-apples test. Radiance reported about 216 tokens per second combined decode with i8 KV, while the llama.cpp HIP reference managed about 59 with q8_0 KV.
They used different 4-bit model formats and Radiance used speculative decoding, while the llama.cpp run did not. The reference run also wasn't tuned to get the best possible llama.cpp result. Treat the gap as a result for those configurations, not proof that every llama.cpp setup will be that much slower.
Kindly Yours:
Backend choice may matter too. A Vulkan comparison would be useful, though observations on a different AMD card don't establish how it will perform on the R9700.
Reply to this answer
Don't extrapolate the 64K results straight to a million tokens. That context length wasn't tested in the single-card benchmark, and the discussion mentioned reports of trouble at very long contexts without pinning down a threshold or cause.
For a long-context setup, check whether the cache actually fits and test the tasks you care about at the prompt lengths you plan to use. The small BF16 speed penalty at 64K doesn't guarantee the same tradeoff at 256K or beyond.
Reply to this answer
There are also results for two R9700s using Radiance 2.5.0, but that's a different setup. One reported roughly 12,250 prefill tokens per second at a 65K prompt and single-request decode ranging from about 278 to 410 tokens per second across several workloads. Useful as a comparison point, not a prediction for one card.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Almond:
The model's hybrid layout may help explain the modest cache difference. The growing KV cache applies to its attention layers, not its fixed-state layers.