Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference

About

Large Language Models (LLMs) require significant GPU memory when processing long texts, with the key value (KV) cache consuming up to 70\% of total memory during inference. Although existing compression methods reduce memory by evaluating the importance of individual tokens, they overlook critical semantic relationships between tokens, resulting in fragmented context and degraded performance. We introduce ChunkKV, which fundamentally reimagines KV cache compression by treating semantic chunks - rather than isolated tokens - as basic compression units. This approach preserves complete linguistic structures and contextual integrity, ensuring that essential meaning is retained even under aggressive compression. Our innovation includes a novel layer-wise index reuse technique that exploits the higher cross-layer similarity of preserved indices in ChunkKV, reducing computational overhead and improving throughput by 26.5\%. Comprehensive evaluations on challenging benchmarks: LongBench, Needle-In-A-HayStack, GSM8K, and JailbreakV demonstrate that ChunkKV outperforms state-of-the-art methods by up to 8.7\% in precision while maintaining the same compression ratio. These results confirm that semantic-aware compression significantly enhances both efficiency and performance for long-context LLM inference, providing a simple yet effective solution to the memory bottleneck problem. The code is available at \href{https://github.com/NVIDIA/kvpress}{link}.

Xiang Liu, Zhenheng Tang, Peijie Dong, Zeyu Li, Yue Liu, Bo Li, Xuming Hu, Xiaowen Chu• 2025

Related benchmarks

TaskDatasetResultRank
Arithmetic ReasoningGSM8K
Accuracy79.32
272
Mathematical ReasoningAIME 25
Pass@1 Accuracy16.67
190
Long-context ReasoningLongBench
Score51.42
107
Mathematical ReasoningGSM8K (test)
Accuracy (GSM8K)80.7
54
Long-context retrievalNIAH
Accuracy81.72
50
Long-context retrieval and reasoningRULER
Score81.17
49
Long-context ReasoningInfiniteBench
Overall Score30.84
45
Document Question AnsweringHotpotQA
Accuracy44.05
13
Long-context retrievalNeedle-in-a-Haystack 64K-token context
Success Rate91.2
12
Long-context UnderstandingLongBench 64K context length
Average Score60.7
11
Showing 10 of 14 rows

Other info

Follow for update