2025-03-21 · 专家 · 机器学习 · 自然语言处理 · 计算机视觉

Plug-and-Play 1.x-Bit KV Cache Quantization for Video Large Language Models

本文提出了一种名为VidKV的插件式KV缓存量化方法,针对视频大语言模型(VideoLLMs)进行低比特量化,有效压缩KV缓存至1.5位和1.58位精度,同时几乎不降低模型性能。

更新于 2025-03-21。作者:Keda Tao、Haoxuan You、Yang Sui、Can Qin、Huan Wang。

中文摘要

视频大型语言模型(VideoLLMs)已经展示了处理更长视频输入并实现复杂推理和分析的能力。然而,由于视频帧中的数千个视觉标记,键值(KV)缓存会显著增加内存需求,成为推理速度和内存使用的瓶颈。KV缓存量化是解决此问题的一种常用方法。在本文中,我们发现VideoLLMs的2位KV量化几乎不会损害模型性能,而更低位数的KV缓存量化的极限尚未得到研究。为了填补这一空白,我们引入了VidKV,这是一种即插即用的KV缓存量化方法,可以将KV缓存压缩到低于2位。具体来说,(1)对于键,我们提出了一种在通道维度的混合精度量化策略,其中对异常通道进行2位量化,对正常通道则结合FFT进行1位量化;(2)对于值,我们实现了1.58位的量化,同时选择性地过滤语义上显著的视觉标记以实现针对性的保留,在精度和模型性能之间取得了更好的平衡。重要的是,我们的发现表明,VideoLLMs的值缓存应该按通道量化,而不是像先前LLMs的KV缓存量化工作所提出的按标记量化。实证研究表明,在六个基准测试中,使用LLaVA-OV-7B和Qwen2.5-VL-7B进行的大量结果显示,VidKV将KV缓存有效地压缩到1.5位和1.58位精度,与FP16版本相比几乎没有任何性能下降。

英文摘要

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

解读

一句话总结

本文提出了一种名为VidKV的插件式KV缓存量化方法,针对视频大语言模型(VideoLLMs)进行低比特量化,有效压缩KV缓存至1.5位和1.58位精度,同时几乎不降低模型性能。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt