PatternKV: Flattening KV Representation Expands Quantization Headroom

Ji Zhang, Yiwei Li, Shaoxiong Feng, Peiwen Yuan, Xinglin Wang, Yueqi Zhang, Jiayi Shi, Chuyi Tan, Boyuan Pan, Yao Hu, Kan Li
Proceedings of the 43rd International Conference on Machine Learning, PMLR 306:156340-156363, 2026.

Abstract

KV cache in autoregressive LLMs eliminates redundant recomputation but has emerged as the dominant memory and bandwidth bottleneck during inference, notably with long contexts and test-time scaling. KV quantization is a key lever for reducing cache cost, but accuracy drops sharply as the native KV distribution lacks flatness and thus maintains a wide quantization range. Prior work focuses on isolating outliers, which caps their error but fails to flatten the overall distribution, leaving performance fragile under low-bit settings. In this work, we show that the K cache maintains a stable, context-evolving structure, while the V cache carries latent semantic regularities, with both contributing to the organization of vectors into shared patterns. Building on these insights, we propose PatternKV, a pattern-aligned residual quantization scheme. It mines representative pattern vectors online, aligns each KV vector to its nearest pattern, and quantizes only the residual. This reshaping of the KV distribution flattens the quantization target and narrows its range, thereby improving the fidelity of low-bit KV quantization. Across long-context and test-time scaling settings on multiple backbones, PatternKV delivers consistent 2-bit gains, incurs only a 0.08% average 4-bit drop relative to FP16, and improves test-time scaling accuracy by 10% on average. Compared with FP16, PatternKV further raises throughput by 1.5$\times$ and supports 1.25$\times$ larger batches.

Cite this Paper


BibTeX
@InProceedings{pmlr-v306-zhang26ci, title = {{P}attern{KV}: Flattening {KV} Representation Expands Quantization Headroom}, author = {Zhang, Ji and Li, Yiwei and Feng, Shaoxiong and Yuan, Peiwen and Wang, Xinglin and Zhang, Yueqi and Shi, Jiayi and Tan, Chuyi and Pan, Boyuan and Hu, Yao and Li, Kan}, booktitle = {Proceedings of the 43rd International Conference on Machine Learning}, pages = {156340--156363}, year = {2026}, editor = {Zhang, Tong and Dudik, Miroslav and Jaggi, Martin and Agarwal, Alekh and Li, Sharon and Schuurmans, Dale and Zhu, Jerry and Berkenkamp, Felix and Dong, Hanze and Bietti, Alberto}, volume = {306}, series = {Proceedings of Machine Learning Research}, month = {06--11 Jul}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v306/main/assets/zhang26ci/zhang26ci.pdf}, url = {https://proceedings.mlr.press/v306/zhang26ci.html}, abstract = {KV cache in autoregressive LLMs eliminates redundant recomputation but has emerged as the dominant memory and bandwidth bottleneck during inference, notably with long contexts and test-time scaling. KV quantization is a key lever for reducing cache cost, but accuracy drops sharply as the native KV distribution lacks flatness and thus maintains a wide quantization range. Prior work focuses on isolating outliers, which caps their error but fails to flatten the overall distribution, leaving performance fragile under low-bit settings. In this work, we show that the K cache maintains a stable, context-evolving structure, while the V cache carries latent semantic regularities, with both contributing to the organization of vectors into shared patterns. Building on these insights, we propose PatternKV, a pattern-aligned residual quantization scheme. It mines representative pattern vectors online, aligns each KV vector to its nearest pattern, and quantizes only the residual. This reshaping of the KV distribution flattens the quantization target and narrows its range, thereby improving the fidelity of low-bit KV quantization. Across long-context and test-time scaling settings on multiple backbones, PatternKV delivers consistent 2-bit gains, incurs only a 0.08% average 4-bit drop relative to FP16, and improves test-time scaling accuracy by 10% on average. Compared with FP16, PatternKV further raises throughput by 1.5$\times$ and supports 1.25$\times$ larger batches.} }
Endnote
%0 Conference Paper %T PatternKV: Flattening KV Representation Expands Quantization Headroom %A Ji Zhang %A Yiwei Li %A Shaoxiong Feng %A Peiwen Yuan %A Xinglin Wang %A Yueqi Zhang %A Jiayi Shi %A Chuyi Tan %A Boyuan Pan %A Yao Hu %A Kan Li %B Proceedings of the 43rd International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2026 %E Tong Zhang %E Miroslav Dudik %E Martin Jaggi %E Alekh Agarwal %E Sharon Li %E Dale Schuurmans %E Jerry Zhu %E Felix Berkenkamp %E Hanze Dong %E Alberto Bietti %F pmlr-v306-zhang26ci %I PMLR %P 156340--156363 %U https://proceedings.mlr.press/v306/zhang26ci.html %V 306 %X KV cache in autoregressive LLMs eliminates redundant recomputation but has emerged as the dominant memory and bandwidth bottleneck during inference, notably with long contexts and test-time scaling. KV quantization is a key lever for reducing cache cost, but accuracy drops sharply as the native KV distribution lacks flatness and thus maintains a wide quantization range. Prior work focuses on isolating outliers, which caps their error but fails to flatten the overall distribution, leaving performance fragile under low-bit settings. In this work, we show that the K cache maintains a stable, context-evolving structure, while the V cache carries latent semantic regularities, with both contributing to the organization of vectors into shared patterns. Building on these insights, we propose PatternKV, a pattern-aligned residual quantization scheme. It mines representative pattern vectors online, aligns each KV vector to its nearest pattern, and quantizes only the residual. This reshaping of the KV distribution flattens the quantization target and narrows its range, thereby improving the fidelity of low-bit KV quantization. Across long-context and test-time scaling settings on multiple backbones, PatternKV delivers consistent 2-bit gains, incurs only a 0.08% average 4-bit drop relative to FP16, and improves test-time scaling accuracy by 10% on average. Compared with FP16, PatternKV further raises throughput by 1.5$\times$ and supports 1.25$\times$ larger batches.
APA
Zhang, J., Li, Y., Feng, S., Yuan, P., Wang, X., Zhang, Y., Shi, J., Tan, C., Pan, B., Hu, Y. & Li, K.. (2026). PatternKV: Flattening KV Representation Expands Quantization Headroom. Proceedings of the 43rd International Conference on Machine Learning, in Proceedings of Machine Learning Research 306:156340-156363 Available from https://proceedings.mlr.press/v306/zhang26ci.html.

Related Material