跳到主要导航 跳到搜索 跳到主要内容

WindowKV: Task-adaptive group-wise KV cache window selection for efficient LLM inference

  • Youhui Zuo
  • , Sibo Wei
  • , Chen Zhang
  • , Zhuorui Liu
  • , Wenpeng Lu
  • , Dawei Song*
  • *此作品的通讯作者
  • Beijing Institute of Technology
  • Qilu University of Technology

科研成果: 期刊稿件 › 文章 › 同行评审

摘要

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).

源语言英语
期刊论文编号134291
期刊Expert Systems with Applications
卷333
DOI
出版状态已出版 - 15 1月 2027

学术指纹

探究 'WindowKV: Task-adaptive group-wise KV cache window selection for efficient LLM inference' 的科研主题。它们共同构成独一无二的学术指纹。

引用此