Local Affine Quantization for KV Caches: From Shared Ranges to Prediction Error
Local four-bit KV-cache quantization preserves language-model quality on some models and fails severely on others. Across eight models, we find small value penalties but widely varying key sensitivity. We investigate a source of this variation: persistent channel offsets that consume a shared key range. A fixed offset cancels in exact softmax attention, yet rounding can turn it into position-varying error that changes relative logits. Native-key measurements show that rare rounding-code changes account for substantial temporal-error energy. In two biased architectures, the rotated key-projection bias accounts for nearly all measured first-layer key energy. Subtracting it before quantization and restoring it afterward repairs severe four-bit degradation; StableLM also benefits from tracking its positional trajectory rather than removing only its fixed mean. To locate the prediction effects, we fit complete baseline and centred grids before substituting reconstructed outputs on shifted coordinates or their block neighbours. Shifted-coordinate outputs suffice for almost all four-bit recovery in Qwen2.5. At two bits, neighbouring outputs become consequential, with the attribution…
- arXiv
- 2612.03029
- Authors
- Shrey Shah, Rohith Kukkala
- Categories
- cs.LG