paper-with-me

홈 › Papers

More for Keys, Less for Values: Adaptive KV Cache Quantization

2025-02-20 · Mohsen Hariri, Lam Nguyen, Sixu Chen, Shaochen Zhong, Qifan Wang, Xia Hu, Xiaotian Han, Vipin Chaudhary

This paper introduces an information-aware quantization framework that adaptively compresses the key-value (KV) cache in large language models (LLMs). Although prior work has underscored the distinct roles of key and value cache during inference, our systematic analysis -- examining singular value distributions, spectral norms, and Frobenius norms -- reveals, for the first time, that key matrices consistently exhibit higher norm values and are more sensitive to quantization than value matrices. Furthermore, our theoretical analysis shows that matrices with higher spectral norms amplify quantization errors more significantly. Motivated by these insights, we propose a mixed-precision quantization strategy, KV-AdaQuant, which allocates more bit-width for keys and fewer for values since key matrices have higher norm values. With the same total KV bit budget, this approach effectively mitigates error propagation across transformer layers while achieving significant memory savings. Our extensive experiments on multiple LLMs (1B--70B) demonstrate that our mixed-precision quantization scheme maintains high model accuracy even under aggressive compression. For instance, using 4-bit for Key and 2-bit for Value achieves an accuracy of 75.2%, whereas reversing the assignment (2-bit for Key and 4-bit for Value) yields only 54.7% accuracy. The code is available at https://tinyurl.com/kv-adaquant

📄 PDF Abstract BibTeX arXiv:2502.15075

Code (0)

등록된 구현이 없습니다.

Tasks

Quantization

Similar Papers 제목 키워드 기반

WeightedKV: Attention Scores Weighted Key-Value Cache Merging for Large Language Models

2025-03-03 · Jian Yuan, Ziwei He, Haoli Bai, Jingwen Leng 외

Large Language Models (LLMs) use key-value (KV) cache to reduce redundant computation in autoregressive generation. However, the KV cache size increases linearly during generation, leading to excessive memory usage, espe…

Language ModelingLanguage Modelling

Thin Keys, Full Values: Reducing KV Cache via Low-Dimensional Attention Selection

2026-02-16 · Hengshuai Yao, Xing Chen, Ahmed Murtadha, Guan Wang arxiv

Standard Transformer attention uses identical dimensionality for queries, keys, and values, yet these components serve different roles: queries and keys produce scalar attention weights (selection), while values carry ri…

Cache Me If You Must: Adaptive Key-Value Quantization for Large Language Models

2025-01-31 · Alina Shutova, Vladimir Malinovskii, Vage Egiazarian, Denis Kuznedelev 외

Efficient real-world deployments of large language models (LLMs) rely on Key-Value (KV) caching for processing and generating long outputs, reducing the need for repetitive computation. For large contexts, Key-Value cach…

GPUQuantization

Homogeneous Keys, Heterogeneous Values: Exploiting Local KV Cache Asymmetry for Long-Context LLMs

2025-06-04 · Wanyun Cui, Mingwei Xu

Recent advances in Large Language Models (LLMs) have highlighted the critical importance of extending context length, yet the quadratic complexity of attention mechanisms poses significant challenges for efficient long-c…

Reconstructing KV Caches with Cross-layer Fusion For Enhanced Transformers

2025-12-03 · Hongzhan Lin, Zhiqi Bai, Xinmiao Zhang, Sen Yang 외 arxiv

Transformer decoders have achieved strong results across tasks, but the memory required for the KV cache becomes prohibitive at long sequence lengths. Although Cross-layer KV Cache sharing (e.g., YOCO, CLA) offers a path…