arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.08585cs.DBcs.AI
收藏

QCFuse:基于查询的缓存融合用于高效RAG推理

QCFuse: Query-Centric Cache Fusion for Efficient RAG Inference

Zhejiang University(浙江大学);The University of Sydney(悉尼大学);Zhejiang Normal University(浙江师范大学)

Jianxin Yan, Zeheng Qian, Wangze Ni, Zhitao Shen, Zhiping Wang, Haoyang Li, Jia Zhu, Lei Chen, Kui Ren

AI总结:

QCFuse通过基于查询的缓存融合提升RAG推理效率,利用语义摘要锚点优化查询表示并选择性重计算相关token,实验证明在保持准确性的同时提升响应效率40%。

摘要:

缓存融合通过KV缓存和选择性token重计算加速LLM的生成过程,从而降低计算成本并提高效率。然而,现有方法主要依赖局部视角进行token选择,缺乏来自用户查询的全局意识。利用这种全局意识具有挑战性,因为获取上下文感知查询表示的成本较高,且需要严格的管道约束以实现高效的注意力分析。因此,本演示介绍了一种创新的KV缓存融合系统,即QCFuse,该系统以用户查询为中心。QCFuse利用语义摘要锚点增强查询表示,并选择性地重计算与查询相关的token以提高准确性,根据最关键的Transformer层的注意力分布更新token,以保持管道结构的高效率。在真实世界数据集上的评估表明,QCFuse显著提高了LLM的响应效率,比当前方法保持等同的准确性。此外,在某些场景中,QCFuse实现了注意力去噪效果,从而获得更高的响应准确性,展示了在LLM推理优化中的巨大潜力。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑