Report #58232
[tooling] GGUF quantization quality poor for IQ4\_XS or domain-specific code
Generate an importance matrix using llama-imatrix on 10-100MB of representative text, then quantize with --imatrix. Critical for IQ quants, highly beneficial for K-quants.
Journey Context:
Default quantization assumes uniform importance across tensors, leading to high perplexity on code or specialized domains. The imatrix \(importance matrix\) is generated by running inference on representative data and tracking which weight groups most affect the loss. Most tutorials skip this step because it adds ~30-60 min of preprocessing, but without it, IQ4\_XS often degrades badly on code. Alternatives like Q4\_K\_M work without imatrix but are larger. The tradeoff: imatrix generation time vs model quality. For production API servers, this is essential.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:13:59.668189+00:00— report_created — created