QCFuse: Query-Centric Cache Fusion for Efficient RAG Inference
Authors: Jianxin Yan, Zeheng Qian, Wangze Ni, Zhitao Shen, Zhiping Wang, Haoyang Li, Jia Zhu, Lei Chen, Kui Ren
Organizations: Zhejiang University, Hangzhou, China · The University of Sydney, Sydney, Australia · Ant Group, Shanghai, Cina · Ant Group, Shanghai, China · PolyU, Hong Kong, China · Zhejiang Normal University, Jinhua, China · HKUST(GZ) & HKUST, Guangzhou, China
Cache fusion accelerates generation process of LLMs equipped with RAG through KV caching and selective token recomputation, thereby reducing computational costs and improving efficiency. However, existing methods primarily rely on local perspectives for token selection and lack global awareness from the user query. Utilizing this global awareness is challenging due to the high cost of obtaining context-aware query representations and the strict pipeline constraints required for efficient attention analysis. Thus, this demonstration introduces QCFuse, an innovative KV cache fusion system centered on the user query. QCFuse leverages semantic summary anchors to enhance query representations and selectively recomputes query-related tokens to improve accuracy, updating tokens based on the attention distribution of the most critical Transformer layer to preserve the high efficiency of the pipeline structure. Evaluations on real-world datasets demonstrate that QCFuse significantly improves the response efficiency of LLMs by 40% while maintaining equivalent accuracy compared to current methods. Additionally, in certain scenarios, QCFuse achieves an attention denoising effect that yields higher response accuracy, demonstrating substantial potential in the optimization of LLM inference.
Figures & tables
Figure 1. Comparison among Full Computation, Full Reuse, and Cache Fusion.
Figure 2. Architecture of the QCFuse System.
Figure 3. Average ROUGE-L vs. TTFT of existing methods under different recomputation ratios (0.1–0.5), averaged across models and datasets.
Figure 4. Detailed Interface of QCFuse for the Demonstration of KV Recomputation.
LLM inference acceleration develops algorithms and systems that reduce language-model latency, memory use, and serving cost while preserving output quality.