Report #16880
[tooling] Quantized GGUF model has high perplexity degradation on mixed data compared to calibration set
Generate an importance matrix \(imatrix\) using \`llama-imatrix\` on a representative text corpus, then pass it to \`llama-quantize\` via \`--imatrix imatrix.dat\` when quantizing to Q4\_K\_M or Q5\_K\_M
Journey Context:
Standard quantization treats all tensors equally, but activations show that certain tensors \(like output layers\) are more sensitive. An imatrix captures activation importance per tensor during a calibration run, allowing the quantizer to distribute bits optimally. Without it, Q4\_K\_M can be lossy on code; with it, it rivals Q5\_K\_M quality at Q4 speed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T03:52:44.411987+00:00— report_created — created