HARD-KV: Head-Adaptive Regularization for Decoding-time KV Compression

Yuxuan Yang, Feiyang Ren, Bowen Zeng, Dalin Zhang, Jinpeng Chen +2 more
6/27/2026
2 citations
cs.LGcs.AI

Official code: SuDIS-ZJU/HARDInfer (0 stars, JavaScript, last commit 2026-02-08).

Abstract

Long-context LLM inference faces a fundamental conflict: head-adaptive compression algorithms (e.g., Top-$p$ nucleus sampling) offer superior accuracy by dynamically fluctuating memory budgets, yet modern inference engines (e.g., vLLM) demand rigid, static memory patterns to leverage CUDA Graphs and PagedAttention. We resolve this ``Static-Dynamic'' mismatch with HARD-KV, a unified framework that that bridges dynamic selection with rigid system constraints.

Show full abstract

HARD-KV introduces a Cascade Cache hierarchy, managing the token lifecycle across dense, sparse, and condensed tiers. Crucially, we propose a Logits Calibration mechanism that normalizes diverse importance metrics into a unified probability space, enabling consistent Top-$p$ budgeting across heterogeneous heads. To bridge the efficiency gap, we offer a system-level solution, which rewrites fragmented, dynamic indices into contiguous physical layouts compatible with high-performance inference engine. Extensive experiments on math-reasoning benchmarks (AIME, U-Math) verify that HARD-KV achieves up to 2$\times$ throughput improvement over static baselines while maintaining high-fidelity generation in 10k+ token scenarios. Code is available at https://github.com/SuDIS-ZJU/HARDInfer.

View on arXivView PDF

Code Implementations(1)

[ICML 2025 poster] HARD-KV: Head-Adaptive Regularization for Decoding-time KV Compression

00JavaScript, PythonMay 17, 20269 months ago

Similar Papers

Cite this paper

@article{yang2026hardkv,
  title  = {HARD-KV: Head-Adaptive Regularization for Decoding-time KV Compression},
  author = {Yuxuan Yang and Feiyang Ren and Bowen Zeng and Dalin Zhang and Jinpeng Chen and Gang Chen and Huan Li},
  year   = {2026},
  eprint = {2606.28831},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.28831v1}
}

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/2606.28831.svg)](https://codeofpaper.com/paper/2606.28831)

Discussion