The Undetected Damage of Quantization on Retrieval and How to Fix It
Luca Zhou, Alessandro Zirilli, Daniele Solombrino, Roberto Dessì, Emanuele Rodolà
Abstract
We show that a quantized model that keeps its classification accuracy still changes to of its top-1 retrieval results, and that aggregate ranking metrics reveal only part of this damage. We tie this failure to the gap between the two highest model scores and use that gap to decide when to trust a quantized answer and where additional precision should be spent. We show that the top-1 result is guaranteed to survive quantization only when this gap exceeds twice the largest rounding error. In classification, the scores are logits, and training compares the correct class against every other class, which encourages this gap. In retrieval, the scores are query-document similarities, and training compares each positive only against sampled negatives, so nothing separates the top-1 item from the second. This gap can be measured without labels. Before deployment, it predicts which models will break under quantization, and at deployment time it tells, per input, whether the quantized answer still matches the full-precision answer. Most classification inputs have a gap wide enough to trust the quantized answer, but few retrieval queries do. That gap motivates a different fix in each task. In retrieval, spending extra bit-width on the layers whose quantization moves the gap most recovers up to three-quarters of an extra bit's benefit for half its cost. In classification, routing the few low-gap inputs to full precision recovers most of the lost accuracy at a fraction of the cost.
Create a lesson
Metadata
- Categories
- cs.LG, cs.AI
- Comments
- 5 figures, 3 tables in the main paper
Related papers
Local Affine Quantization for KV Caches: From Shared Ranges to Prediction Error
Shared title terminologycs.LGShrey Shah, Rohith Kukkala
Less Random, More Incoherent: Greedy Hadamard Alignment for LLM Quantization
Shared title terminologycs.LGYun Ye, Zhaoqi Wu, Xueshu Wang et al.
Quantization-Robust Unlearning through the Lens of Retain-Forget Loss Landscapes Interaction
Shared title terminologycs.LGJialu Wang, Jianing Deng, Shuqing Luo et al.
Train Where the Quantized Model Goes: On-Policy Distillation for Low-Bit Reasoning
Shared title terminologycs.LGYuanteng Chen, Zhilei Liu, Peisong Wang et al.
Geometry-Aware Hyperbolic Residual-Quantized Variational Autoencoders
Shared title terminologycs.LGAlessio Colombo, Melika Ayoughi
Disaggregated Quantization: Specializing LLM Prefill and Decode
Shared title terminologycs.LGAndrei Panferov, Maximilian Kleinegger, Sweta Priyadarshi et al.