WindowQuant: Mixed-Precision KV Cache Quantization based on Window-Level Similarity for VLMs Inference Optimization

Wei Tao, Xiaoyang Qu, Peiqiang Wang, Guokuan Li, Jiguang Wan, Kai Lu, Jianzong WangarXiv 2026

TL;DR

WindowQuant optimizes Video Language Model (VLM) inference by applying mixed-precision quantization to the KV cache at a coarse window level rather than token level. By matching quantization bit-widths to text-prompt similarity and reordering memory layout for hardware efficiency, it slashes memory usage and boosts decoding throughput by roughly 3× while maintaining or even improving model accuracy.

What Problem Does This Paper Address?

Video Language Models (VLMs) are powerful tools for video understanding, but processing long video sequences is incredibly resource-intensive. When a VLM processes a video, it converts frames into a massive sequence of visual tokens. Storing the Key-Value (KV) states of these tokens in the KV cache creates a massive memory bottleneck. For instance, a 30-second video can cause the visual KV cache to balloon to over 21 GB, completely dwarfing the model's actual weights and easily exceeding typical GPU memory limits.

Fig. 1. (a): An example of VLM application. (b): The memory usage comparison of KV cache (including visual token and text token) and weight of the Llava-OneVision-0.5B model when processing two videos of different lengths. Left: 0.5s video. Right: 30s video.

Existing solutions attempt mixed-precision quantization (assigning fewer bits to less important tokens), but they operate at a token-by-token granularity. This creates two major issues:

  1. Slow Search Times: Finding the optimal bit-width for every individual token online is computationally expensive.
  2. Hardware Inefficiency: Mixing different bit-widths (e.g., FP16, INT4, INT2) contiguously in memory breaks GPU cache line alignment and wastes SIMD (Single Instruction, Multiple Data) hardware resources, leading to high inference latency.

Methods

WindowQuant introduces a two-pronged approach to solve these efficiency bottlenecks:

  1. Window-Level Quantization Search: Instead of evaluating individual tokens, WindowQuant segments visual tokens into fixed-size windows. It computes the cosine similarity between each visual token window and the text prompt embedding. Based on this score, it dynamically assigns a bit-width configuration:
  2. High similarity: Kept at FP16 to preserve critical details.
  3. Moderate similarity: Quantized to INT4.
  4. Low similarity: Aggressively quantized to INT2.

Additionally, the first visual token window is always locked to FP16, serving as an "attention sink" to preserve foundational context. Layer-adaptive threshold functions are also used to adjust quantization aggressiveness based on how sensitive a specific transformer layer is to precision loss.

  1. Window-Level KV Cache Computation (Reordering): To fix hardware inefficiencies, WindowQuant physically reorders the KV cache windows before quantization. It groups windows sharing the same bit-width together so they are stored contiguously in physical memory. During the decoding stage, the model performs matrix multiplication on these uniform blocks separately and concatenates the results, maximizing GPU cache utilization.

Datasets

The authors evaluated WindowQuant across several prominent video question-answering and long-context benchmarks:

  • NExT-QA: Evaluates causal and temporal reasoning in video understanding.
  • EgoSchema: Focuses on long-form video comprehension from an egocentric perspective.
  • IntentQA: Tests the model's ability to infer human intentions from video.
  • MVBench: A comprehensive benchmark covering 19 distinct video understanding tasks.
  • MileBench: Benchmarks multi-modal long-context capabilities across 12 tasks.

Key Insights and Ideas

  • Prompt-Driven Redundancy: A user's text prompt acts as a highly specific filter. Visual token heatmaps reveal that for any given query, the vast majority of video windows are entirely irrelevant to the answer.
Fig. 3. The similarity heatmap between a video and 10 text prompts. Most of the video windows are irrelevant to the text prompt.
  • The Commutative Loophole: While mixing bit-widths sequentially destroys hardware performance, the authors realized that the order of sub-blocks within the KV cache doesn't mathematically affect the final attention output during the decoding stage. Because matrix addition is commutative, memory can be safely defragmented and grouped by bit-width.
  • Quantization as a Noise Filter: Surprisingly, aggressively quantizing irrelevant windows sometimes improves model accuracy. By compressing background noise and irrelevant visual data, the model can focus more effectively on the segments highlighted by the text prompt.

Key Results

WindowQuant was integrated into several state-of-the-art VLMs, including LLaVA-OneVision-Qwen2-7B, Qwen2-VL-7B, and InternVL2-8B, yielding significant performance gains:

  • Throughput Boost: Achieved an approximate 3× increase in decoding throughput compared to the full-precision FP16 baseline as batch sizes scaled.
  • Memory Reduction: Reduced GPU memory usage by 1.61 GB to 6.48 GB depending on the number of video frames processed.
  • Accuracy Improvements: Outperformed existing uniform and mixed-precision quantization methods (like SmoothQuant, KIVI, and SKVQ). On the NExT-QA dataset, applying WindowQuant to LLaVA-OneVision-Qwen2-7B actually boosted accuracy from 67.8% to 78.9%.

Limitations and Future Work

  • Prefill Stage Limitations: The memory reordering trick cannot be applied during the initial prefill stage because the causal mask matrix breaks the commutative property of the attention blocks. WindowQuant works around this by computing the first output token normally before reordering and quantizing the cache for the remaining decoding steps.
  • FFN Activation Bottleneck: While the method drastically reduces KV cache size, intermediate activations within the Feed-Forward Network (FFN) blocks still consume substantial peak memory during prefill. The authors note that optimizing these FFN activations is a primary direction for future work.

Summary updated

BibTeX
@misc{tao2026windowquant,
  author = {Wei Tao and Xiaoyang Qu and Peiqiang Wang and Guokuan Li and Jiguang Wan and Kai Lu and Jianzong Wang},
  title = {{WindowQuant: Mixed-Precision KV Cache Quantization based on Window-Level Similarity for VLMs Inference Optimization}},
  year = {2026},
  eprint = {2605.02262},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.02262},
}
Figure