paper-with-me

홈 › Papers

SCOPE: Optimizing Key-Value Cache Compression in Long-context Generation

2024-12-18 · Jialong Wu, Zhenglin Wang, Linhai Zhang, Yilong Lai, Yulan He, Deyu Zhou

Key-Value (KV) cache has become a bottleneck of LLMs for long-context generation. Despite the numerous efforts in this area, the optimization for the decoding phase is generally ignored. However, we believe such optimization is crucial, especially for long-output generation tasks based on the following two observations: (i) Excessive compression during the prefill phase, which requires specific full context impairs the comprehension of the reasoning task; (ii) Deviation of heavy hitters occurs in the reasoning tasks with long outputs. Therefore, SCOPE, a simple yet efficient framework that separately performs KV cache optimization during the prefill and decoding phases, is introduced. Specifically, the KV cache during the prefill phase is preserved to maintain the essential information, while a novel strategy based on sliding is proposed to select essential heavy hitters for the decoding phase. Memory usage and memory transfer are further optimized using adaptive and discontinuous strategies. Extensive experiments on LongGenBench show the effectiveness and generalization of SCOPE and its compatibility as a plug-in to other prefill-only KV compression methods.

📄 PDF Abstract BibTeX arXiv:2412.13649

Code (1)

linking-ai/scope 공식 구현 pytorch

Similar Papers 제목 키워드 기반

ReCalKV: Low-Rank KV Cache Compression via Head Reordering and Offline Calibration

2025-05-30 · Xianglong Yan, Zhiteng Li, Tianao Zhang, Linghe Kong 외

Large language models (LLMs) have achieved remarkable performance, yet their capability on long-context reasoning is often constrained by the excessive memory required to store the Key-Value (KV) cache. This makes KV cac…

Low-rank compression

TaskPress: Query-Agnostic KV Cache Compression via Task-Guided Pruning

2026-08-04 · Wonpyo Park, Seung-won Hwang arxiv

Long-context inference with large language models is constrained by the linear growth of the key-value cache to sequence length. While pruning offers mitigation, prevailing methods determine query-specific token importan…

CSKV: Training-Efficient Channel Shrinking for KV Cache in Long-Context Scenarios

2024-09-16 · Luning Wang, Shiyao Li, Xuefei Ning, Zhihang Yuan 외

Large Language Models (LLMs) have been widely adopted to process long-context tasks. However, the large memory overhead of the key-value (KV) cache poses significant challenges in long-context scenarios. Existing trainin…

SVDq: 1.25-bit and 410x Key Cache Compression for LLM Attention

2025-02-21 · Hong Yankun, Li Xing, Zhen Hui-Ling, Yu Xianzhi 외

For the efficient inference of Large Language Models (LLMs), the effective compression of key-value (KV) cache is essential. Three main types of KV cache compression techniques, namely sparsity, channel compression, and …

Quantization

Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference

2024-07-16 · Yuan Feng, Junlin Lv, Yukun Cao, Xike Xie 외

Large Language Models have excelled in various domains but face efficiency challenges due to the growing Key-Value (KV) cache required for long-sequence inference. Recent efforts aim to reduce KV cache size by evicting v…