Dynamic block-sparse attention skips most of the attention work of a long prompt. On accelerators whose multicast is statically routed and flow-controlled, such as wafer-scale engines, the pruning gains far less than the skipped work suggests: with the conventional placement, sparse attention that skips most of the blocks still takes most of the dense attention time. The cause is multicast backpressure: a route advances only when every destination has a free buffer, so processing elements (PEs) that receive the same key-value stream stall each other when their work falls at different points of it. We present SparseWafer, which reduces this stall by placing query rows. The rows that share one selection decision select the same key blocks, so spreading them cyclically over the PEs of a stream gives every PE the same work on every block, and we prove that such PEs run as fast as one PE alone, for any buffer depth. A per-head start offset, which starts each query head at a different set of PEs, extends this balance across the multicast routes that share one key-value stream; it depends only on tensor shapes and is fixed before run time. We evaluate SparseWafer on the Cerebras SDK's WSE-3 simulator and a model calibrated on it, with selection and data movement included. With the masks of a published selection method (XAttention), SparseWafer is 1.31-1.49x faster than sparse prefill with the conventional placement at each model's longest context. With these masks, sparse prefill loses at most 1.8 points of accuracy on the RULER long-context benchmark, and on the denser masks of RULER prompts SparseWafer is still 1.28-1.54x faster than dense prefill at 128K. It is also faster than mask-aware load balancers and within 5-10% in attention time of an idealized, zero-cost one: on such networks, the shape of the computation decides almost all of where each row belongs.


翻译:暂无翻译

0
下载
关闭预览

相关内容

ICML 2026教程:用KET统一Attention与Diffusion
专知会员服务
12+阅读 · 7月10日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
35+阅读 · 2019年10月18日
《DeepGCNs: Making GCNs Go as Deep as CNNs》
专知会员服务
32+阅读 · 2019年10月17日
稀疏大模型简述:从MoE、Sparse Attention到GLaM
夕小瑶的卖萌屋
14+阅读 · 2022年3月22日
分布式并行架构Ray介绍
CreateAMind
10+阅读 · 2019年8月9日
深度学习中Attention Mechanism详细介绍:原理、分类及应用
深度学习与NLP
10+阅读 · 2019年2月18日
SQN算法效果及代码: Breakout-ram-v4 打砖块
CreateAMind
12+阅读 · 2019年1月21日
利用动态深度学习预测金融时间序列基于Python
量化投资与机器学习
18+阅读 · 2018年10月30日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年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日
相关资讯
稀疏大模型简述:从MoE、Sparse Attention到GLaM
夕小瑶的卖萌屋
14+阅读 · 2022年3月22日
分布式并行架构Ray介绍
CreateAMind
10+阅读 · 2019年8月9日
深度学习中Attention Mechanism详细介绍:原理、分类及应用
深度学习与NLP
10+阅读 · 2019年2月18日
SQN算法效果及代码: Breakout-ram-v4 打砖块
CreateAMind
12+阅读 · 2019年1月21日
利用动态深度学习预测金融时间序列基于Python
量化投资与机器学习
18+阅读 · 2018年10月30日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员