TY - JOUR
T1 - WindowKV
T2 - Task-adaptive group-wise KV cache window selection for efficient LLM inference
AU - Zuo, Youhui
AU - Wei, Sibo
AU - Zhang, Chen
AU - Liu, Zhuorui
AU - Lu, Wenpeng
AU - Song, Dawei
N1 - Publisher Copyright:
© 2026 Elsevier Ltd. All rights are reserved, including those for text and data mining, AI training, and similar technologies.
PY - 2027/1/15
Y1 - 2027/1/15
N2 - With the advancements in long-context inference capabilities of large language models (LLMs), the KV cache has become one of the foundational components. While recent studies have focused on optimizing the memory occupied by the KV cache, they overlook two critical factors: preserving semantic coherence and considering task-specific characteristic during compression. To address these limitations, we propose a novel task-adaptive KV cache window selection method, WindowKV. WindowKV dynamically selects local semantic windows consisting of consecutive tokens, according to task-specific characteristics, ensuring the retained KV cache captures continuous, essential context. Additionally, we introduce an intra-group layer KV cache indices sharing strategy to reduce computational overhead, achieving a balance between performance and efficiency. We rigorously evaluate WindowKV on the LongBench benchmark, and the results demonstrate that it maintains a performance comparable to full KV cache retention while using only 12% of the original KV cache, significantly reducing memory requirements. Furthermore, our method also achieves state-of-the-art results in the Needle-in-a-Haystack evaluation, highlighting its effectiveness and robustness. (Our code is available at GitHub).
AB - With the advancements in long-context inference capabilities of large language models (LLMs), the KV cache has become one of the foundational components. While recent studies have focused on optimizing the memory occupied by the KV cache, they overlook two critical factors: preserving semantic coherence and considering task-specific characteristic during compression. To address these limitations, we propose a novel task-adaptive KV cache window selection method, WindowKV. WindowKV dynamically selects local semantic windows consisting of consecutive tokens, according to task-specific characteristics, ensuring the retained KV cache captures continuous, essential context. Additionally, we introduce an intra-group layer KV cache indices sharing strategy to reduce computational overhead, achieving a balance between performance and efficiency. We rigorously evaluate WindowKV on the LongBench benchmark, and the results demonstrate that it maintains a performance comparable to full KV cache retention while using only 12% of the original KV cache, significantly reducing memory requirements. Furthermore, our method also achieves state-of-the-art results in the Needle-in-a-Haystack evaluation, highlighting its effectiveness and robustness. (Our code is available at GitHub).
KW - Inference efficiency
KW - KV cache compression
KW - Large language model
UR - https://www.scopus.com/pages/publications/105050059667
U2 - 10.1016/j.eswa.2026.134291
DO - 10.1016/j.eswa.2026.134291
M3 - Article
AN - SCOPUS:105050059667
SN - 0957-4174
VL - 333
JO - Expert Systems with Applications
JF - Expert Systems with Applications
M1 - 134291
ER -