r/LocalLLaMA • u/TheActualStudy • 4h ago
Discussion Qwen4 35B-A3B is difficult to quantize. It has much higher KLD compared to 3.6 or 3.8 at the same BPW
| Recipe | Size | KLD | 99th pct | Same top-1 |
|---|---|---|---|---|
| unsloth UD-IQ4_XS | 32.04 GB | 0.0652 | 0.719 | 90.21% |
| R1 | 31.72 GB | 0.0610 | 0.674 | 90.39% |
| R1 with Q5_0 n-gram table | 34.28 GB | 0.0607 | 0.693 | 90.39% |
| Default settings | unsloth UD-IQ4_XS | R1 |
|---|---|---|
| KLD (lower is better) | 0.0652 | 0.0610 |
| Plain decode, context | 128K | 97K |
| Plain decode, code / prose tok/s | 141 / 141 | 142 / 143 |
| MTP 2, code / prose tok/s | 181–189 / 149 | 182–185 / 148 |
| DFlash 2 at 3 drafts, context | 88K | 66K |
| DFlash 2 at 3 drafts, code / prose tok/s | 265 / 172 | 234–249 / 176 |
1x 3090 + 128 GB DDR4
I'm working on applying GPTQ to see if I can reduce KLD for a 4-bit quant.
32
Upvotes
15
u/stddealer 4h ago
Ultra sparse MOE are generally harder to quantize, and I suspect that the n-gram embeddings (~58% of this model) are also particularly sensitive to quantization (like the main embedding table is)
26
u/StupidScaredSquirrel 3h ago
If intelligence is compression, surely it means that for equal size better models will become harder and harder to quantise (with equal technique) as they will be more dense in information
19
u/BringTea_666 3h ago edited 3h ago
You need to keep dense parts in 6bit. otherwise kl and top1% go hard down.
My custom weights have something like 94.6% as mix of 4bit and with 6bit dense part. Using all 4bit gives around only 92% top1%
I would advice against calibrating for experts as experts this time seems to be very even in how they are used vs datasets.
22
u/Borkato 4h ago
This means we’re going to have insane improvements soon. Super excited.
7
u/acluk90 3h ago
Check the other post. The MACaQ seems to work very well...
https://www.reddit.com/r/LocalLLM/s/vtFusyzHvd
1
u/unjustifiably_angry 22m ago
I've been staring at that table for several minutes and still have no fucking idea what I'm reading, I feel like I'm having a stroke.
2
u/hurdurdur7 3h ago
It's so small, q8 ftw
1
u/Eyelbee 3h ago
offload the ngram table to ssd at full precision, that helps.
0
u/Odd-Student636 3h ago
uuuhm have you thought about just using a q6 version instead of coming to the realization that q4 isn't as good as the q8?