๐ค AI Summary
Existing MLLM services employ context caching that only reuses fixed-prefix KV states, rendering them ill-suited for text-image interleaved inputs and dynamic prefix variations in multimodal RAGโleading to substantial redundant recomputation. This work proposes a **position-agnostic multimodal KV caching mechanism**, the first to decouple positional encoding from cached KV states, enabling flexible, cross-sequence and cross-modal KV reuse. Our approach integrates on-demand recomputation, multimodal token alignment, dynamic scheduling, and disk-persistent loading. Experiments demonstrate that, while preserving near-lossless accuracy (<0.3% degradation), our method reduces end-to-end latency by up to 54%, significantly outperforming state-of-the-art caching schemes.
๐ Abstract
The context caching technique is employed to accelerate the Multimodal Large Language Model (MLLM) inference by prevailing serving platforms currently. However, this approach merely reuses the Key-Value (KV) cache of the initial sequence of prompt, resulting in full KV cache recomputation even if the prefix differs slightly. This becomes particularly inefficient in the context of interleaved text and images, as well as multimodal retrieval-augmented generation. This paper proposes position-independent caching as a more effective approach for multimodal information management. We have designed and implemented a caching system, named MPIC, to address both system-level and algorithm-level challenges. MPIC stores the KV cache on local or remote disks when receiving multimodal data, and calculates and loads the KV cache in parallel during inference. To mitigate accuracy degradation, we have incorporated integrated reuse and recompute mechanisms within the system. The experimental results demonstrate that MPIC can achieve up to 54% reduction in response time compared to existing context caching systems, while maintaining negligible or no accuracy loss.