Plug-and-Play 1.x-Bit KV Cache Kwantisatie voor Video Large Language Modellen
Plug-and-Play 1.x-Bit KV Cache Quantization for Video Large Language Models
March 20, 2025
Auteurs: Keda Tao, Haoxuan You, Yang Sui, Can Qin, Huan Wang
cs.AI
Samenvatting
Video large language models (VideoLLMs) hebben het vermogen aangetoond om langere video-invoer te verwerken en complexe redenering en analyse mogelijk te maken. Echter, vanwege de duizenden visuele tokens uit de videoframes, kan de key-value (KV) cache de geheugenvereisten aanzienlijk verhogen, wat een knelpunt wordt voor de inferentiesnelheid en het geheugengebruik. KV-cache-kwantisatie is een veelgebruikte aanpak om dit probleem aan te pakken. In dit artikel ontdekken we dat 2-bit KV-kwantisatie van VideoLLMs de modelprestaties nauwelijks schaadt, terwijl de limiet van KV-cache-kwantisatie in nog lagere bits nog niet is onderzocht. Om deze kloof te overbruggen, introduceren we VidKV, een plug-and-play KV-cache-kwantisatiemethode om de KV-cache te comprimeren tot minder dan 2 bits. Specifiek: (1) voor de key stellen we een mixed-precision-kwantisatiestrategie voor in de kanaaldimensie, waarbij we 2-bit-kwantisatie uitvoeren voor afwijkende kanalen en 1-bit-kwantisatie gecombineerd met FFT voor normale kanalen; (2) voor de value implementeren we 1.58-bit-kwantisatie terwijl we selectief semantisch belangrijke visuele tokens filteren voor gerichte bewaring, voor een betere afweging tussen precisie en modelprestaties. Belangrijk is dat onze bevindingen suggereren dat de value-cache van VideoLLMs per kanaal moet worden gekwantiseerd in plaats van per token, zoals voorgesteld door eerdere KV-cache-kwantisatiewerkzaamheden voor LLMs. Empirisch laten uitgebreide resultaten met LLaVA-OV-7B en Qwen2.5-VL-7B op zes benchmarks zien dat VidKV de KV-cache effectief comprimeert tot 1.5-bit en 1.58-bit precisie met bijna geen prestatieverlies in vergelijking met de FP16-tegenhangers.
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, 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.Summary
AI-Generated Summary