I'm comparing quantization recipes for Qwen4-35B-A3B. How much do the quality scores matter in practice, and what do the speed and context results suggest?
How much quality and speed do you lose quantizing Qwen4-35B?
Answers
The reported R1 recipe looks slightly better on the measured quality metrics than the UD-IQ4_XS recipe, while also being a little smaller. R1 is 31.72 GB with KLD of 0.0610 and 90.39% top-1 agreement. UD-IQ4_XS is 32.04 GB, 0.0652 KLD and 90.21% agreement.
Lower KLD means the quantized model's output probabilities are closer to the reference on the test data. Top-1 agreement measures how often the highest-probability token matches. Those are useful comparisons, but neither tells you directly how much a coding task or conversation will suffer. Test your own workloads too.
Reply to this answer
The speed tradeoff isn't just about the quant. In the reported setup with one 3090 and 128 GB of DDR4, plain decoding was roughly 141 to 143 tokens per second for both recipes. MTP and DFlash improved speed, but DFlash varied a lot between code and prose.
Context capacity also differed. Plain decoding was reported at 128K for UD-IQ4_XS versus 97K for R1, while DFlash with three drafts was 88K versus 66K. That's a meaningful trade if you need long context. These numbers are for that particular engine and configuration, not guaranteed speeds or limits elsewhere.
Reply to this answer
Mixed precision is worth considering rather than forcing every part to four bits. One reported approach keeps the dense components at six bits and uses mostly four-bit weights elsewhere. Its top-1 agreement was reported around 94.6%, compared with roughly 92% for an all-four-bit version.
Those figures aren't directly comparable to the other table without knowing the test setup and reference. There's also a suggestion that calibrating the experts separately may not help much if their usage is fairly even across datasets. That needs more testing rather than being taken as a rule.
Reply to this answer
The n-gram table is a plausible place to investigate, but the results don't pin the problem on it. Switching that table to Q5_0 in R1 increased size from 31.72 GB to 34.28 GB while KLD only moved from 0.0610 to 0.0607 and top-1 agreement stayed at 90.39%.
A return to BF16 for the table was also reported not to recover much KLD. Sparse mixture-of-experts structure may make quantization tricky too, but the cause is still uncertain.
Reply to this answer
If memory permits, a higher-bit version is another option rather than spending time squeezing every last improvement out of a four-bit recipe. It will need more storage and memory, though, and these results don't provide a direct Q6 or Q8 quality and speed comparison.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Sunnybank:
So R1's better KLD doesn't automatically make it the better choice if I need the extra context?
Blueberry Muffin:
Right. The reported quality difference is small, while the context difference could matter a lot for a long document or codebase.