Reproduce “ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Xiang Liu, Zhenheng Tang, Peijie Dong, Zeyu Li, Yue Liu, Bo Li, Xuming Hu, Xiaowen Chu
ChunkKV reduces KV cache use by scoring fixed-size consecutive token chunks with attention from a recent observation window, rather than selecting tokens independently. It retains recent tokens and can reuse selections across adjacent layers. On NIAH, it reaches 73.8% retrieval accuracy versus PyramidKV’s 65.1% with LLaMA-3-8B-Instruct at 8K context and cache size 128; this result is specific to that setting.
Key insights
- Preserving semantic chunks, rather than isolated tokens, is crucial for maintaining linguistic coherence and avoiding performance degradation when compressing the KV cache in LLMs.
- The importance of semantic chunks tends to persist across different transformer layers, allowing for efficient reuse of selected indices and reducing computational costs.
- Fragmenting semantic dependencies (as in token-level compression) introduces 'noise' that hinders in-context learning, while chunk-level preservation reduces this noise, improving LLM performance.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.