EviCastKV: A New Query-Driven Approach to Multimodal KV Cache Compression

EviCastKV compresses multimodal KV caches in a training-free, query-conditioned way, balancing quality and latency.
EviCastKV addresses KV cache bloat in multimodal LLM inference with a training-free, query-conditioned cache construction method that jointly handles evidence preservation, physical allocation, and execution cost. Its exact-retention configuration packs original K/V entries within a byte budget while preserving positions, and its shared-source configuration quantizes common projection inputs while precisely protecting selected entries and reconstructing layer-local operands. On COCO (40 MiB), CIDEr rises from 107.84 to 111.48 and request time drops 19.65%; on MileBench (16 MiB), ROUGE-L improves by 2.21 points, accuracy by 18.75 points, and request time drops 38.6%.
Multimodal large language models generate enormous key-value (KV) caches during inference, and how to compress these caches efficiently has become a key deployment challenge. EviCastKV proposes a training-free, query-conditioned cache construction method that balances quality and latency through two configurations: "exact retention" and "shared source."

Core Problem: The Triple Constraints of KV Cache Compression
When multimodal models process joint image and text inputs, the KV cache is not only large but also involves three coupled issues: evidence preservation, physical allocation, and execution cost. Traditional compression methods often focus on a single dimension—for example, discarding tokens by attention weight—while ignoring changes in query conditions and the integrity of multimodal evidence. EviCastKV treats cache construction as a query-conditioned process that dynamically decides which K/V entries are worth keeping and how to allocate storage, all without retraining the model.
KV cache is the core memory overhead during autoregressive Transformer inference. When generating each new token, the model needs the Key and Value vectors of all previous tokens to compute attention; to avoid recomputation, these vectors are cached and reused. For multimodal large models, the hundreds to thousands of visual tokens produced by the visual encoder enter the cache alongside text tokens, making it far larger than in pure-text scenarios. Cache size grows linearly with sequence length and directly determines the number of concurrent requests and context length that can be supported. Therefore, compressing the KV cache (discarding, quantizing, or merging entries) becomes a key means of reducing memory usage and improving throughput, but it also brings risks of evidence loss and quality degradation.
Two Configurations: Exact Retention vs. Shared Source
EviCastKV offers two complementary cache construction strategies, each aimed at different deployment preferences.
Exact Retention Configuration
This configuration combines prompt-conditioned demand estimation, value-sensitive multimodal coverage, and routing planning. Specifically, it evaluates the importance of each K/V entry based on the current query, considers cross-modal evidence coverage, and uses routing planning to decide which original entries to retain. A shared-capacity transaction then packs the selected original K/V entries under an initial physical byte budget while keeping their positional information unchanged. This design ensures that critical evidence is fully preserved while strictly adhering to the memory budget.
Shared Source Configuration
This configuration takes the quantization route: it quantizes common projection inputs, precisely protects selected entries, and reconstructs layer-local operands. Checks on 256 COCO images show that this configuration uses 41.14/73.22 MiB of storage at initial/final decoding and achieves a CIDEr score of 119.77. This indicates that the shared source configuration finds another path balancing storage efficiency and quality.
Quantization refers to representing K/V vectors originally in FP16 with a lower bit width (e.g., 8-bit or 4-bit), thereby reducing storage footprint multiplicatively. Common projection inputs refer to pre-projection activations shared by multiple layers or positions in a multimodal model; quantizing these shared inputs compresses a large amount of redundant data at once without processing entries individually. Precise protection means maintaining original precision for key entries selected through query-conditioned filtering, preventing quantization errors from harming task-relevant evidence. Layer-local operand reconstruction means recomputing the K/V operands needed by each layer internally using the quantized common inputs and the retained exact entries, thereby maintaining computational correctness while compressing storage—this is exactly why the shared source configuration can still achieve 119.77 CIDEr at an initial footprint of 41.14 MiB.
Experimental Results: Dual Gains in Quality and Latency
Across multiple benchmarks, EviCastKV demonstrates performance superior to existing methods.
COCO Image Captioning Task
On two LLaVA checkpoints, matched-capacity experiments show that under a 40 MiB budget, EviCastKV raises COCO CIDEr from 107.84 (local VL-Cache implementation) to 111.48 while reducing average request time by 19.65%. This means that under the same memory limit, not only is generation quality higher, but inference is also faster.
CIDEr (Consensus-based Image Description Evaluation) is a mainstream metric for image captioning. It measures semantic consistency by computing the TF-IDF-weighted n-gram cosine similarity between generated captions and multiple human reference captions; a higher score indicates captions closer to human consensus. ROUGE-L, on the other hand, measures recall overlap between generated and reference text based on the longest common subsequence, and is commonly used in generation tasks such as summarization and visual question answering. Both are surface-overlap metrics that are sensitive to whether key evidence is preserved, making them suitable for testing whether cache compression harms task-relevant information. Understanding these metrics helps interpret the practical significance of the reported improvements: a CIDEr gain of about 3.6 points and a ROUGE-L gain of 2.21 points represent perceptible improvements in generation quality.
MileBench Multimodal Benchmark
Under a 16 MiB budget, EviCastKV improves ROUGE-L by 2.21 points, accuracy by 18.75 percentage points, and reduces request time by 38.6% compared to the local LOOK-M implementation. These gains are particularly significant in resource-constrained scenarios, showing that query-conditioned cache construction can more effectively preserve task-relevant evidence.
In addition, the Prompt Top-K method remains competitive in quality, but EviCastKV achieves a better trade-off through a more refined allocation strategy.
Design Insight: Query Conditioning Is the Key to Compression
The core insight of EviCastKV is that the value of a KV cache is highly dependent on the current query. Rather than compressing the cache statically, it is better to construct the cache dynamically based on the query. The exact retention configuration suits tasks with extremely high requirements for evidence integrity, while the shared source configuration provides a higher compression ratio in storage-sensitive scenarios. Together, they characterize the complementary trade-offs between quality-latency and storage in query-conditioned multimodal cache construction.
For practical deployment, this method requires no additional training and can be integrated directly into existing inference pipelines. In the future, further reducing the overhead of routing planning and adapting to longer multimodal contexts will be worthwhile directions to explore.
One-line Summary
EviCastKV compresses multimodal KV caches in a training-free, query-conditioned manner, balancing quality and latency.
Paragraph Summary
To address KV cache bloat during multimodal large model inference, EviCastKV proposes a training-free, query-conditioned cache construction method that jointly handles three coupled issues: evidence preservation, physical allocation, and execution cost. The method offers two configurations: the exact retention configuration combines prompt-conditioned demand estimation, value-sensitive multimodal coverage, and routing planning to pack original K/V entries within an initial byte budget while keeping positions unchanged; the shared source configuration quantizes common projection inputs, precisely protects selected entries, and reconstructs layer-local operands. Experiments show that under a 40 MiB budget, COCO CIDEr improves from 107.84 to 111.48 with a 19.65% reduction in request time; under a 16 MiB budget on MileBench, compared to LOOK-M, ROUGE-L improves by 2.21 points, accuracy by 18.75 percentage points, and request time drops by 38.6%.
Related articles

AI SDK zai 3.0.60 Update: Patch-Only Dependency Upgrade
AI SDK's @ai-sdk/zai releases patch version 3.0.60, only updating provider-utils and openai-compatible dependencies. This article analyzes the practical impact on developers and upgrade recommendations.

@ai-sdk/xai 5.0.53 Patch Release: The Signal Behind the Dependency Update
@ai-sdk/xai releases patch 5.0.53, updating @ai-sdk/provider-utils to 5.0.86. What this patch means, its SemVer signal, and what it means for developers.

@ai-sdk/voyage 2.0.88 Released: The Maintenance Signal Behind a Dependency Patch Update
@ai-sdk/voyage 2.0.88 is released, updating only the dependency @ai-sdk/provider-utils@5.0.86 in a patch-level maintenance release. This article covers the changes, automated release workflow, and upgrade notes for developers.