arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2602.02197cs.LGcs.AI
收藏

分层自适应淘汰用于多模态语言模型的KV缓存管理

Hierarchical Adaptive Eviction for KV Cache Management in Multimodal Language Models

College of Intelligence and Computing, Tianjin University(智能与计算学院,天津大学)

Xindian Ma, Yidi Lu, Peng Zhang, Jing Zhang

AI总结:

本文提出HAE框架,通过双注意力修剪和动态解码淘汰策略优化多模态语言模型的KV缓存管理,减少内存使用并提升推理效率。

摘要:

将视觉信息整合到大型语言模型(LLMs)中已经使多模态大语言模型(MLLMs)成为可能,但Transformer架构的二次内存和计算成本仍是一个瓶颈。现有的KV缓存淘汰策略未能解决视觉和文本标记之间的异构注意力分布,导致效率低下或性能下降。在本文中,我们提出了分层自适应淘汰(HAE),这是一种KV缓存淘汰框架,通过在预填充期间实施双注意力修剪(利用视觉标记稀疏性和注意力方差)和解码期间的动态解码淘汰策略(受操作系统回收站启发),优化MLLMs中的文本-视觉标记交互。HAE在各层中最小化KV缓存使用,通过索引广播减少计算开销,并在理论上确保优于贪心策略的信息完整性和更低的误差界,从而在理解和生成任务中提高效率。实验表明,HAE在图像理解任务中将KV缓存内存减少了41%,精度损失最小(0.3%下降),并在Phi3.5-Vision-Instruct模型上加速故事生成推理1.5倍,同时保持输出质量。

英文摘要:

The integration of visual information into Large Language Models (LLMs) has enabled Multimodal LLMs (MLLMs), but the quadratic memory and computational costs of Transformer architectures remain a bottleneck. Existing KV cache eviction strategies fail to address the heterogeneous attention distributions between visual and text tokens, leading to suboptimal efficiency or degraded performance. In this paper, we propose Hierarchical Adaptive Eviction (HAE), a KV cache eviction framework that optimizes text-visual token interaction in MLLMs by implementing Dual-Attention Pruning during pre-filling (leveraging visual token sparsity and attention variance) and a Dynamic Decoding Eviction Strategy (inspired by OS Recycle Bins) during decoding. HAE minimizes KV cache usage across layers, reduces computational overhead via index broadcasting, and theoretically ensures superior information integrity and lower error bounds compared to greedy strategies, enhancing efficiency in both comprehension and generation tasks. Empirically, HAE reduces KV-Cache memory by 41\% with minimal accuracy loss (0.3\% drop) in image understanding tasks and accelerates story generation inference by 1.5x while maintaining output quality on Phi3.5-Vision-Instruct model.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑