Report #103915
[tooling] IQ2\_XXS/IQ4\_XS GGUF quants look small but quality is disappointing
Generate an importance matrix with llama-imatrix on representative data, then quantize with --imatrix imatrix.dat. Without an imatrix, skip IQ quants and use K-quants \(Q4\_K\_M / Q5\_K\_M\) instead.
Journey Context:
IQ \(Imatrix\) quants use data-aware calibration to allocate bits where they matter. Without the importance matrix, they are just aggressive low-bit quantizers and often underperform K-quants at similar sizes. The workflow: run ./llama-imatrix -m model-f16.gguf -f train-data.txt -ngl 99 -o imatrix.dat, then ./llama-quantize --imatrix imatrix.dat model-f16.gguf output.gguf IQ4\_XS. The calibration data should match your target domain; code agents should use code/text mixes, not generic WikiText. Output.weight is excluded by default \(--process-output false\) because the original author found imatrix hurts that tensor.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-13T04:55:28.225825+00:00— report_created — created