Sparse attention reduces the per-step decoding cost of language models trained with full attention. However, it can lengthen generations and lower accuracy, offsetting the per-step savings with additional tokens. We find that sparse-attention errors are most detrimental at steps where the full-attention next-token entropy is high: applying sparse attention only at these steps degrades accuracy far more than applying it at an equal number of random steps. We further find that at these high-entropy steps, most of the degradation stems from errors accumulated into the key-value (KV) cache during earlier sparse decoding, so even attending to the entire cache at such steps results in performance degradation. Motivated by these findings, we propose SparseRepairer, a method which uses sparse next-token entropy to trigger a KV refresh - a full-attention pass that recomputes and replaces the cached KV states to yield the dense next-token distribution for sampling. Across three reasoning models and four benchmarks, SparseRepairer improves accuracy by up to 18.0 percentage points and reduces generation length by up to 49.1% over Quest, while achieving better accuracy-efficiency trade-offs than periodic refresh with both Quest and TidalDecode. With an optimized GPU implementation, SparseRepairer matches dense decoding accuracy with 23.6% lower wall-clock time and runs 7.9% faster than periodic refresh on 87 long-generation MATH-500 problems.


翻译:暂无翻译

0
下载
关闭预览

相关内容

ICML 2026教程:用KET统一Attention与Diffusion
专知会员服务
12+阅读 · 7月10日
【NeurIPS2024】注意力迁移对视觉Transformer的惊人有效性研究
【KAUST博士论文】高效视觉语言基础模型学习,197页pdf
专知会员服务
36+阅读 · 2024年1月1日
【NeurIPS2022】图谱视角下的图对比学习
专知会员服务
27+阅读 · 2022年10月9日
【CVPR2022】跨模态检索的协同双流视觉语言预训练模型
专知会员服务
21+阅读 · 2022年4月21日
专知会员服务
38+阅读 · 2021年5月15日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
61+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
白话attention综述(上)
AINLP
12+阅读 · 2019年12月14日
赛尔笔记 | Attention!注意力机制可解释吗?
哈工大SCIR
23+阅读 · 2019年9月27日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
自然语言处理 | 使用Spacy 进行自然语言处理(二)
机器学习和数学
10+阅读 · 2018年8月27日
Attention模型方法综述 | 多篇经典论文解读
PaperWeekly
107+阅读 · 2018年6月11日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
【干货】基于Keras的注意力机制实战
专知
59+阅读 · 2018年5月4日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
最新内容
《评估人机编队性能的标准指标》
专知会员服务
8+阅读 · 11月30日
《美陆军装甲排的自动化任务分配模型》59页
专知会员服务
6+阅读 · 11月30日
乌克兰海陆空无人力量
专知会员服务
3+阅读 · 11月30日
超越技术:美战争部的AI变革管理
专知会员服务
7+阅读 · 11月27日
北约400亿美元反无人机能力投资建设
专知会员服务
7+阅读 · 11月25日
反小型无人机系统方案评估(27页)
专知会员服务
15+阅读 · 11月25日
相关资讯
白话attention综述(上)
AINLP
12+阅读 · 2019年12月14日
赛尔笔记 | Attention!注意力机制可解释吗?
哈工大SCIR
23+阅读 · 2019年9月27日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
自然语言处理 | 使用Spacy 进行自然语言处理(二)
机器学习和数学
10+阅读 · 2018年8月27日
Attention模型方法综述 | 多篇经典论文解读
PaperWeekly
107+阅读 · 2018年6月11日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
【干货】基于Keras的注意力机制实战
专知
59+阅读 · 2018年5月4日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
相关基金
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员