HybridKV: Hybrid KV Cache Compression for Efficient Multimodal Large Language Model Inference
AI 摘要
HybridKV通过混合压缩策略,显著降低多模态大模型推理时KV缓存的内存占用,提升推理速度。
主要贡献
- 提出HybridKV混合KV缓存压缩框架
- 基于文本注意力分类静态和动态头
- 分层预算分配方案和特定头部的压缩策略
方法论
通过文本注意力分类头部,分层分配预算,并对静态头部进行文本先验剪枝,对动态头部进行分块检索。
原文摘要
Multimodal Large Language Models (MLLMs) have advanced unified reasoning over text, images, and videos, but their inference is hindered by the rapid growth of key-value (KV) caches. Each visual input expands into thousands of tokens, causing caches to scale linearly with context length and remain resident in GPU memory throughout decoding, which leads to prohibitive memory overhead and latency even on high-end GPUs. A common solution is to compress caches under a fixed allocated budget at different granularities: token-level uniformly discards less important tokens, layer-level varies retention across layers, and head-level redistributes budgets across heads. Yet these approaches stop at allocation and overlook the heterogeneous behaviors of attention heads that require distinct compression strategies. We propose HybridKV, a hybrid KV cache compression framework that integrates complementary strategies in three stages: heads are first classified into static or dynamic types using text-centric attention; then a top-down budget allocation scheme hierarchically assigns KV budgets; finally, static heads are compressed by text-prior pruning and dynamic heads by chunk-wise retrieval. Experiments on 11 multimodal benchmarks with Qwen2.5-VL-7B show that HybridKV reduces KV cache memory by up to $7.9\times$ and achieves $1.52\times$ faster decoding, with almost no performance drop or even higher relative to the full-cache MLLM.