ReCalKV: Low-Rank KV Cache Compression via Head Reordering and Offline Calibration

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yan, Xianglong, Li, Zhiteng, Zhang, Tianao, Qin, Haotong, Kong, Linghe, Zhang, Yulun, Yang, Xiaokang
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912610808496128
author Yan, Xianglong
Li, Zhiteng
Zhang, Tianao
Qin, Haotong
Kong, Linghe
Zhang, Yulun
Yang, Xiaokang
author_facet Yan, Xianglong
Li, Zhiteng
Zhang, Tianao
Qin, Haotong
Kong, Linghe
Zhang, Yulun
Yang, Xiaokang
contents Large language models (LLMs) have demonstrated remarkable performance, but their long-context reasoning remains constrained by the excessive memory required for the Key-Value (KV) cache. This makes KV cache compression a critical step toward efficient long-context inference. Recent methods have explored low-rank techniques to reduce the hidden size of the KV cache. However, they neglect the distinct roles and varying importance of Keys and Values, leading to significant performance drops under high compression. To address this, we propose ReCalKV, a post-training low-rank KV cache compression approach with tailored strategies for Keys and Values. For Keys, we propose Head-wise Similarity aware Reordering (HSR), which clusters structurally similar heads into groups, enabling more accurate low-rank approximation via grouped SVD. For Values, we propose Offline Value Calibration (OVC), which efficiently calibrates the value projection matrix using calibration data without training, ensuring an accurate representation of contextual information. Extensive experiments show that ReCalKV consistently outperforms existing low-rank compression methods, achieving high compression ratios with minimal performance loss. The code and models will be available at:https://github.com/XIANGLONGYAN/ReCalKV.
format Preprint
id arxiv_https___arxiv_org_abs_2505_24357
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle ReCalKV: Low-Rank KV Cache Compression via Head Reordering and Offline Calibration
Yan, Xianglong
Li, Zhiteng
Zhang, Tianao
Qin, Haotong
Kong, Linghe
Zhang, Yulun
Yang, Xiaokang
Machine Learning
Artificial Intelligence
Large language models (LLMs) have demonstrated remarkable performance, but their long-context reasoning remains constrained by the excessive memory required for the Key-Value (KV) cache. This makes KV cache compression a critical step toward efficient long-context inference. Recent methods have explored low-rank techniques to reduce the hidden size of the KV cache. However, they neglect the distinct roles and varying importance of Keys and Values, leading to significant performance drops under high compression. To address this, we propose ReCalKV, a post-training low-rank KV cache compression approach with tailored strategies for Keys and Values. For Keys, we propose Head-wise Similarity aware Reordering (HSR), which clusters structurally similar heads into groups, enabling more accurate low-rank approximation via grouped SVD. For Values, we propose Offline Value Calibration (OVC), which efficiently calibrates the value projection matrix using calibration data without training, ensuring an accurate representation of contextual information. Extensive experiments show that ReCalKV consistently outperforms existing low-rank compression methods, achieving high compression ratios with minimal performance loss. The code and models will be available at:https://github.com/XIANGLONGYAN/ReCalKV.
title ReCalKV: Low-Rank KV Cache Compression via Head Reordering and Offline Calibration
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2505.24357