ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference
Abstract
Large Language Models (LLMs) have demonstrated remarkable capabilities in processing extensive contexts, but this ability comes with significant GPU memory costs, particularly in the key-value (KV) cache. Although recent KV cache compression methods show strong performance, all use discrete tokens to maintain the KV cache, leading to a loss of chunk semantic information. We introduce ChunkKV, a novel KV cache compression method that retains the most informative semantic chunks while discarding the less important ones. ChunkKV preserves semantic information by grouping related tokens. Furthermore, ChunkKV exhibits a higher similarity in the indices of the retained KV cache across different layers, so we also propose a layer-wise index reuse technique to further reduce computational overhead. This technique not only improves compression efficiency, but also provides insight into the similarities between layers within LLMs. We evaluated ChunkKV on long-context benchmarks including LongBench and Needle-In-A-HayStack, as well as the GSM8K in-context learning benchmark. Our experiments, conducted with models LLaMA-3-8B-Instruct, Mistral-7B-Instruct, and Qwen2-7B-Instruct, demonstrate that ChunkKV outperforms other KV cache compression methods in performance, even surpassing the full KV cache under the same conditions. With a compression ratio of 10\%, ChunkKV achieves state-of-the-art performance on various tasks, indicating its effectiveness in semantic preservation and model performance for long-context and in-context LLM inference.
BibTeX
@misc{liu2025chunkkv,
author = {Xiang Liu and Zhenheng Tang and Peijie Dong and Zeyu Li and Bo Li and Xuming Hu and Xiaowen Chu},
title = {{ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference}},
year = {2025},
url = {https://openreview.net/forum?id=8sglLco8Ti},
howpublished = {OpenReview},
note = {Submitted to ICLR 2025},
}Ask Althea to put this paper to the test.
Loading related content...