Retrieval-Augmented Generation (RAG) injects LLM queries with relevant documents to improve response quality. This injection increases prompt length and slows time to first token (TTFT). Unlike standard queries, RAG queries have a unique property of context reuse where the same documents recur across user queries. Thus, fully recomputing documents for every RAG query does redundant compute and increases TTFT. Prior works precompute KV tensors of RAG documents offline and coarsely recompute some tokens during online prefill. However, such KV reuse is often slower than full recomputation on modern GPUs due to high-latency disk transfers. Further, such a coarse-grained recomputation degrades accuracy. To address these limitations, this paper proposes SIFT: Selective-Index For Fast Compute of RAG Prefill by Exploiting Attention Invariance. SIFT processes documents offline and extracts fine-grained locations of high attention scores for each document. Next, we identify the following attention invariance insights that enable us to exploit the extracted locations during runtime: (1) Local-Attention Invariance: The location of high attention scores within a document remain invariant to surrounding documents. This helps us predict the location of high scores where the document attends to itself. (2) Cross-Attention Consistency: Keys with high intra-document attention also attract cross-attention from subsequent documents. This helps us predict the location of high scores where the document attends to future documents. Critically, SIFT stores no KV data and only stores locations of high scores in the form of two compact bit vectors. SIFT's storage is up to 24,000x smaller than KV tensors, obviating costly disk transfers. During prefill, SIFT computes the attention only for the marked locations and improves TTFT by 1.71x while holding accuracy within 1% of full recompute.


翻译:暂无翻译

0
下载
关闭预览

相关内容

检索增强生成(RAG)技术,261页slides
专知会员服务
42+阅读 · 2025年10月16日
【新书】Essential GraphRAG: 知识图谱增强的RAG
专知会员服务
35+阅读 · 2025年7月17日
【SIGIR2025教程】动态与参数化检索增强生成
专知会员服务
17+阅读 · 2025年7月14日
【新书】检索增强生成(RAG)入门指南
专知会员服务
30+阅读 · 2025年6月25日
微软最新《检索增强生成(RAG)》综述
专知会员服务
57+阅读 · 2024年9月24日
KG-Agent:面向KG复杂推理的高效自治代理框架
专知会员服务
35+阅读 · 2024年6月1日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
利用动态深度学习预测金融时间序列基于Python
量化投资与机器学习
18+阅读 · 2018年10月30日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
最新内容
重新思考无人机时代的生存能力
专知会员服务
4+阅读 · 今天7:44
装甲突击旅:现代战争思考、战斗与组织
专知会员服务
4+阅读 · 今天7:28
在人工智能加速决策环境中拓展OODA循环
专知会员服务
4+阅读 · 今天7:18
军事欺骗:供作战战术指挥官使用的工具
专知会员服务
4+阅读 · 今天7:03
综述 | 世界动作模型:少做梦,多行动
专知会员服务
5+阅读 · 6月23日
美以伊冲突:无人机与人工智能的运用
专知会员服务
10+阅读 · 6月23日
《特种部队在透明战场中的生存力》最新报告
专知会员服务
5+阅读 · 6月23日
相关VIP内容
检索增强生成(RAG)技术,261页slides
专知会员服务
42+阅读 · 2025年10月16日
【新书】Essential GraphRAG: 知识图谱增强的RAG
专知会员服务
35+阅读 · 2025年7月17日
【SIGIR2025教程】动态与参数化检索增强生成
专知会员服务
17+阅读 · 2025年7月14日
【新书】检索增强生成(RAG)入门指南
专知会员服务
30+阅读 · 2025年6月25日
微软最新《检索增强生成(RAG)》综述
专知会员服务
57+阅读 · 2024年9月24日
KG-Agent:面向KG复杂推理的高效自治代理框架
专知会员服务
35+阅读 · 2024年6月1日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
相关资讯
利用动态深度学习预测金融时间序列基于Python
量化投资与机器学习
18+阅读 · 2018年10月30日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员