融合重要性与多样性:KV缓存压缩的联合优化
Mixing Importance with Diversity: Joint Optimization for KV Cache Compression in Large Vision-Language Models
AI总结:
MixKV通过融合重要性与多样性,优化KV缓存压缩,提升多模态模型的存储效率与推理性能。
摘要:
近期大型视觉-语言模型(LVLMs)在处理扩展的多模态序列方面表现出显著能力,但由此产生的键值(KV)缓存膨胀却形成了关键的记忆瓶颈,从根本上限制了部署的可扩展性。尽管现有KV缓存压缩方法专注于保留高重要性KV对以最小化存储,但它们常常忽视了在多模态KV缓存中出现的模态特定的语义冗余模式。在本工作中,我们首先分析了KV缓存中,除了简单的的重要性外,不同注意力头之间存在不同水平的冗余性。我们证明,仅依赖重要性只能覆盖KV缓存信息分布的一部分,可能导致语义覆盖的损失。为此,我们提出了MixKV,一种新的方法,通过融合重要性与多样性,对LVLMs的KV缓存进行优化压缩。MixKV适应于头部语义冗余,选择性地在压缩KV对时平衡多样性和重要性。广泛的实验表明,MixKV在多个LVLMs上持续提升了现有方法。在极端压缩(预算=64)下,MixKV在五个多模态理解基准上平均提高了基线方法5.1%,并在GUI定位任务上实现了SnapKV和AdaKV的显著提升,8.0%和9.0%的提升,同时保持了可比的推理效率。此外,MixKV无缝扩展到LLMs,取得了可比的性能提升。我们的代码可在https://github.com/xuyang-liu16/MixKV上获得。
英文摘要:
Recent large vision-language models (LVLMs) demonstrate remarkable capabilities in processing extended multi-modal sequences, yet the resulting key-value (KV) cache expansion creates a critical memory bottleneck that fundamentally limits deployment scalability. While existing KV cache compression methods focus on retaining high-importance KV pairs to minimize storage, they often overlook the modality-specific semantic redundancy patterns that emerge distinctively in multi-modal KV caches. In this work, we first analyze how, beyond simple importance, the KV cache in LVLMs exhibits varying levels of redundancy across attention heads. We show that relying solely on importance can only cover a subset of the full KV cache information distribution, leading to potential loss of semantic coverage. To address this, we propose MixKV, a novel method that mixes importance with diversity for optimized KV cache compression in LVLMs. MixKV adapts to head-wise semantic redundancy, selectively balancing diversity and importance when compressing KV pairs. Extensive experiments demonstrate that MixKV consistently enhances existing methods across multiple LVLMs. Under extreme compression (budget=64), MixKV improves baseline methods by an average of 5.1% across five multi-modal understanding benchmarks and achieves remarkable gains of 8.0% and 9.0% for SnapKV and AdaKV on GUI grounding tasks, all while maintaining comparable inference efficiency. Furthermore, MixKV extends seamlessly to LLMs with comparable performance gains. Our code is available at https://github.com/xuyang-liu16/MixKV.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。