将视频大模型的键值缓存压缩至1.58比特,几乎不损失性能。
Plug-and-Play 1.x-Bit KV Cache Quantization for Video Large Language Models
- 关键通道用2比特,正常通道用1比特+FFT混合量化;
- 值缓存实现1.58比特量化并保留重要视觉特征;
- 适配视频大模型,比传统逐令牌量化更有效。
视频大语言模型(VideoLLMs)具备处理长视频输入与复杂推理的能力,但视频帧产生的数千个视觉标记导致键值(KV)缓存占用大量内存,成为推理速度与内存使用的瓶颈。KV缓存量化是常用缓解方法。本文发现,对VideoLLMs进行2比特量化几乎不影响性能,而更低比特的量化极限尚未被探索。为此,我们提出VidKV,一种即插即用的低比特KV缓存压缩方法,可将缓存压缩至2比特以下。具体而言:(1)对键采用通道维度的混合精度量化,异常通道使用2比特,正常通道结合1比特与快速傅里叶变换(FFT);(2)对值采用1.58比特量化,并选择性保留语义显著的视觉标记以平衡精度与性能。实验表明,在六个基准测试上,基于LLaVA-OV-7B和Qwen2.5-VL-7B的评估显示,VidKV能将KV缓存压缩至1.5比特和1.58比特,与FP16基线相比性能几乎无损。
原文摘要 · Abstract (English)
Video large language models (VideoLLMs) have demonstrated the capability to process longer video inputs and enable complex reasoning and analysis. However, due to the thousands of visual tokens from the video frames, the key-value (KV) cache can significantly increase memory requirements, becoming a bottleneck for inference speed and memory usage. KV cache quantization is a widely used approach to address this problem. In this paper, we find that 2-bit KV quantization of VideoLLMs can hardly hurt the model performance, while the limit of KV cache quantization in even lower bits has not been investigated. To bridge this gap, we introduce VidKV, a plug-and-play KV cache quantization method to compress the KV cache to lower than 2 bits. Specifically, (1) for key, we propose a mixed-precision quantization strategy in the channel dimension, where we perform 2-bit quantization for anomalous channels and 1-bit quantization combined with FFT for normal channels; (2) for value, we implement 1.58-bit quantization while selectively filtering semantically salient visual tokens for targeted preservation, for a better trade-off between precision and model performance. Importantly, our findings suggest that the value cache of VideoLLMs should be quantized in a per-channel fashion instead of the per-token fashion proposed by prior KV cache quantization works for LLMs. Empirically, extensive results with LLaVA-OV-7B and Qwen2.5-VL-7B on six benchmarks show that VidKV effectively compresses the KV cache to 1.5-bit and 1.58-bit precision with almost no performance drop compared to the FP16 counterparts.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。