Retrieval-augmented generation (RAG) improves large language model (LLM) answer quality by grounding generation in external evidence, but processing retrieved contexts makes the prefill stage a dominant serving cost. RAG cache fusion reduces this cost by reusing precomputed key-value (KV) caches for retrieved chunks and selectively recomputing tokens under the current prompt. Existing selectors, however, face a dilemma between quality and efficiency: fast query-agnostic or final-layer query-to-context selectors can miss request-relevant evidence, whereas full-view query-aware selectors require broad context and layer visibility before recomputation and therefore stall the layer-wise cache-fusion pipeline. We present QCFuse, a compressed-view query-aware selector for RAG cache fusion. QCFuse uses chunk-anchor query probing to condition user-query states on compact per-chunk anchors and critical-layer profiling to identify recomputation tokens without all-layer inspection. We implement QCFuse in SGLang and evaluate it on four open-weight LLMs across six datasets. QCFuse reaches full-prefill-level quality. At matched quality, QCFuse achieves an average prefill-time speedup of 1.7x over full prefill and 1.5x over ProphetKV, the strongest quality-preserving baseline.


翻译:[translated abstract in Chinese] 检索增强生成(RAG)通过将生成过程锚定于外部证据来提升大语言模型(LLM)的回答质量,但处理检索到的上下文会导致预填充阶段成为主要的服务成本。RAG缓存融合技术通过复用已检索文本块的预计算键值(KV)缓存,并在当前提示词下选择性重计算部分token来降低此成本。然而,现有选择器面临质量与效率的两难困境:快速但查询无关或仅依赖最终层查询-上下文选择器可能遗漏与请求相关的证据,而全视图查询感知选择器在重计算前需获取广泛的上下文和层级可见性,从而阻碍了逐层缓存融合流水线。我们提出QCFuse,一种用于RAG缓存融合的压缩视图查询感知选择器。QCFuse采用分块锚点查询探测机制,将用户查询状态条件化于紧凑的逐块锚点上,并通过关键层剖析技术在不遍历所有层的情况下识别重计算token。我们在SGLang中实现QCFuse,并在六个数据集上对四个开源权重LLM进行评估。QCFuse达到全预填充级质量。在同等质量条件下,QCFuse相较于全预填充平均实现1.7倍的预填充加速比,相较于最强质量保持基线ProphetKV实现1.5倍加速比。

0
下载
关闭预览

相关内容

检索增强生成(RAG)技术,261页slides
专知会员服务
42+阅读 · 2025年10月16日
【新书】Essential GraphRAG: 知识图谱增强的RAG
专知会员服务
35+阅读 · 2025年7月17日
定制化大型语言模型的图检索增强生成综述
专知会员服务
39+阅读 · 2025年1月28日
图增强生成(GraphRAG)
专知会员服务
35+阅读 · 2025年1月4日
《大型语言模型中基于检索的文本生成》综述
专知会员服务
60+阅读 · 2024年4月18日
Query 理解和语义召回在知乎搜索中的应用
DataFunTalk
25+阅读 · 2020年1月2日
NLG ≠ 机器写作 | 专家专栏
量子位
13+阅读 · 2018年9月10日
100+中文词向量,总有一款适合你
专知
12+阅读 · 2018年5月13日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
最新内容
综述 | Self-Evolving Coding Agents:自进化编程智能体
专知会员服务
0+阅读 · 今天13:16
美海军陆战队将三型无人机整合入统一战场网络
专知会员服务
2+阅读 · 今天9:39
《无人机蜂群:释放人类-蜂群编队的潜能》
专知会员服务
4+阅读 · 今天9:12
《战略战术化:一项综合性述评》
专知会员服务
2+阅读 · 今天9:08
美陆军-工业界协同推进反无人机系统技术发展
专知会员服务
1+阅读 · 今天8:46
相关VIP内容
检索增强生成(RAG)技术,261页slides
专知会员服务
42+阅读 · 2025年10月16日
【新书】Essential GraphRAG: 知识图谱增强的RAG
专知会员服务
35+阅读 · 2025年7月17日
定制化大型语言模型的图检索增强生成综述
专知会员服务
39+阅读 · 2025年1月28日
图增强生成(GraphRAG)
专知会员服务
35+阅读 · 2025年1月4日
《大型语言模型中基于检索的文本生成》综述
专知会员服务
60+阅读 · 2024年4月18日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员