Evaluating Quantised Models
A quantised model is meant to be a drop-in replacement, so matching aggregate accuracy is the wrong acceptance test; what you need to measure is how often its answers differ from the original's.
Here is the pattern that ships broken quantised models. The team quantises, runs MMLU and a few other benchmarks, sees the score drop from 68.2 to 67.9, declares the loss negligible, and deploys. Users report that answers have changed. Both observations are correct.
Accuracy is a marginal, and marginals hide swaps
Benchmark accuracy counts how many questions are answered correctly. It says nothing about which ones. A quantised model can newly fail 6% of the questions the baseline got right and newly pass 5.7% it got wrong, and the aggregate moves by 0.3 points.
The metric that catches this is the flip: a question whose correctness changes in either direction between baseline and compressed model. Across seven tasks and six quantisation schemes, aggregate accuracy differences stayed within 2 points while all schemes except GPTQ W8A16 showed large flip counts, and the compressed models underperformed substantially on MT-Bench generative evaluation (Dutta et al., 2024, Accuracy is Not All You Need, NeurIPS 2024, arXiv:2407.09141).
The framing that resolves the contradiction: a quantised model's goal is not to be capable, it is to be the same. You already accepted the baseline's capability. Compression is only successful if end users cannot tell. That is a distance question, not an accuracy question.
What to measure instead
Flip rate on your evaluation set, reported directionally: how many correct-to-incorrect, how many incorrect-to-correct. The second number is not a bonus; it is evidence the model changed.
KL divergence between the baseline's and the quantised model's next-token distributions on a fixed corpus. It is continuous, needs no labels, correlates with flips, and is far more sensitive than accuracy because it sees the whole distribution rather than the arg-max.
Generative evaluation. Multiple-choice benchmarks read a single token position. Quantisation error compounds over hundreds of autoregressive steps, so long-form generation degrades earlier and more visibly than any multiple-choice score suggests. Run a generative judge or a pairwise preference comparison against the baseline; see LLM-as-judge.
Long-context and structured output. Both are error-amplifying. Format adherence, JSON validity and function-call correctness frequently break before benchmark accuracy moves; see structured generation.
A workable acceptance gate
- Fix a corpus of a few thousand real production prompts.
- Generate greedily from baseline and quantised model, same seed and same batch shape, so that batch-invariance confounds do not contaminate the comparison.
- Report token-level KL, exact-match rate on outputs, flip rate on the labelled subset, and a pairwise preference score.
- Break out by segment: long prompts, non-English, code, structured output. Aggregate numbers hide the segments where quantisation lands hardest.
- Only then look at latency and memory.
When it breaks
Calibration-set contamination. If the quantisation calibration data came from the same distribution as the evaluation, the evaluation is measuring fit to the calibration set. Hold out the evaluation corpus from calibration explicitly.
Perplexity is too coarse. WikiText perplexity is the most reported quantisation metric and among the least informative: it averages over a distribution dominated by easy tokens, so a method can hold perplexity while degrading exactly on the rare tokens that carry task performance.
The comparison is not reproducible by default. Different batch sizes and kernel paths change floating-point reduction order, so baseline and quantised runs can differ for reasons unrelated to quantisation. Pin the serving configuration before attributing a difference.
Speedup claims need the same rigour. Report at your batch size, your sequence lengths, your hardware. A 3x decode speedup measured at batch 1 says little about a server running batch 64, where the weight read is already amortised.
Nobody re-evaluates after a weight change. Merging a LoRA adapter, continuing pretraining, or swapping a checkpoint invalidates the calibration and the evaluation together. Requantise and re-gate; the pipeline should make this automatic rather than remembered.
12 flashcards for this concept
Click a card to reveal the answer.