KVSlimmer: Theoretical Insights and Practical Optimizations for Asymmetric KV Merging

Lianjun Liu, Hongli An, Weiqi Yan, Xin Du, Shengchuan Zhang +2 more
3/1/2026
cs.CL

Official code: lianjunl13-sudo/KVSlimmer (5 stars, Apache-2.0, last commit 2026-03-08).

Abstract

The growing computational and memory demands of the Key-Value (KV) cache significantly limit the ability of Large Language Models (LLMs). While KV merging has emerged as a promising solution, existing methods that rely on empirical observations of KV asymmetry and gradient-based Hessian approximations lack a theoretical foundation and incur suboptimal compression and inference overhead. To bridge these gaps, we establish a theoretical framework that characterizes this asymmetry through the spectral energy distribution of projection weights, demonstrating that concentrated spectra in Query/Key weights induce feature homogeneity, whereas dispersed spectra in Value weights preserve heterogeneity. Then, we introduce KVSlimmer, an efficient algorithm that captures exact Hessian information through a mathematically exact formulation, and derives a closed-form solution utilizing only forward-pass variables, resulting in a gradient-free approach that is both memory- and time-efficient. Extensive experiments across various models and benchmarks demonstrate that KVSlimmer consistently outperforms SOTA methods. For instance, on Llama3.1-8B-Instruct, it improves the LongBench average score by 0.92 while reducing memory costs and latency by 29% and 28%, respectively.Code is available at https://github.com/lianjunl13-sudo/KVSlimmer.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

KVSlimmer: Theoretical Insights and Practical Optimizations for Asymmetric KV Merging

50PythonMar 7, 20267 months agoApache-2.0

Cite this paper

@article{liu2026kvslimmer,
  title  = {KVSlimmer: Theoretical Insights and Practical Optimizations for Asymmetric KV Merging},
  author = {Lianjun Liu and Hongli An and Weiqi Yan and Xin Du and Shengchuan Zhang and Huazhong Liu and Yunshan Zhong},
  year   = {2026},
  eprint = {2603.00907},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.00907v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.00907.svg)](https://codeofpaper.com/paper/2603.00907)

Discussion