跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 硬件体系结构

arXiv:2012.09852 (cs)
[提交于 2020年12月17日 (v1),最后修订于 2024年7月18日 (此版本, v3)]

标题:SpAtten: Efficient Sparse Attention Architecture with Cascade Token and Head Pruning

作者:Hanrui Wang, Zhekai Zhang, Song Han
查看论文《SpAtten: Efficient Sparse Attention Architecture with Cascade Token and Head Pruning》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:The attention mechanism is becoming increasingly popular in Natural Language Processing (NLP) applications, showing superior performance than convolutional and recurrent architectures. However, attention becomes the compution bottleneck because of its quadratic computational complexity to input length, complicated data movement and low arithmetic intensity. Moreover, existing NN accelerators mainly focus on optimizing convolutional or recurrent models, and cannot efficiently support attention. In this paper, we present SpAtten, an efficient algorithm-architecture co-design that leverages token sparsity, head sparsity, and quantization opportunities to reduce the attention computation and memory access. Inspired by the high redundancy of human languages, we propose the novel cascade token pruning to prune away unimportant tokens in the sentence. We also propose cascade head pruning to remove unessential heads. Cascade pruning is fundamentally different from weight pruning since there is no trainable weight in the attention mechanism, and the pruned tokens and heads are selected on the fly. To efficiently support them on hardware, we design a novel top-k engine to rank token and head importance scores with high throughput. Furthermore, we propose progressive quantization that first fetches MSBs only and performs the computation; if the confidence is low, it fetches LSBs and recomputes the attention outputs, trading computation for memory reduction. Extensive experiments on 30 benchmarks show that, on average, SpAtten reduces DRAM access by 10.0x with no accuracy loss, and achieves 1.6x, 3.0x, 162x, 347x speedup, and 1,4x, 3.2x, 1193x, 4059x energy savings over A3 accelerator, MNNFast accelerator, TITAN Xp GPU, Xeon CPU, respectively.
评论: Published as a conference paper in HPCA 2021; 15 pages, 23 figures
主题: 硬件体系结构 (cs.AR); 人工智能 (cs.AI); 计算与语言 (cs.CL); 机器学习 (cs.LG)
引用方式: arXiv:2012.09852 [cs.AR]
  (或者 arXiv:2012.09852v3 [cs.AR] 对于此版本)
  https://doi.org/10.48550/arXiv.2012.09852
相关 DOI: https://doi.org/10.1109/HPCA51647.2021.00018

提交历史

来自:Hanrui Wang
[v1] 2020年12月17日 星期四 18:59:07 UTC
[v3] 2024年7月18日 星期四 18:48:38 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.CL
< 上一篇   |   下一篇 >
最新 | 近期 | 2024-07
切换浏览方式为:
cs
cs.AR
cs.AI
cs.LG

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站