Self-attention-based transformer models have achieved tremendous success in the domain of natural language processing. Despite their efficacy, accelerating the transformer is challenging due to its quadratic computational complexity and large activation sizes. Existing transformer accelerators attempt to prune its tokens to reduce memory access, albeit with high compute overheads. Moreover, previous works directly operate on large matrices involved in the attention operation, which limits hardware utilization. In order to address these challenges, this work proposes a novel dynamic inference scheme, DynaTran, which prunes activations at runtime with low overhead, substantially reducing the number of ineffectual operations. This improves the throughput of transformer inference. We further propose tiling the matrices in transformer operations along with diverse dataflows to improve data reuse, thus enabling higher energy efficiency. To effectively implement these methods, we propose AccelTran, a novel accelerator architecture for transformers. Extensive experiments with different models and benchmarks demonstrate that DynaTran achieves higher accuracy than the state-of-the-art top-k hardware-aware pruning strategy while attaining up to 1.2$\times$ higher sparsity. One of our proposed accelerators, AccelTran-Edge, achieves 330K$\times$ higher throughput with 93K$\times$ lower energy requirement when compared to a Raspberry Pi device. On the other hand, AccelTran-Server achieves 5.73$\times$ higher throughput and 3.69$\times$ lower energy consumption compared to the state-of-the-art transformer co-processor, Energon. The simulation source code is available at https://github.com/jha-lab/acceltran.


翻译:基于自注意力机制的Transformer模型在自然语言处理领域取得了巨大成功。由于其二次计算复杂度和大型激活尺寸,加速Transformer是具有挑战性的。现有的Transformer加速器尝试减少内存访问,尽管存在高计算开销。此外,以往的工作直接在注意力操作中涉及大型矩阵,这限制了硬件利用率。为解决这些挑战,本研究提出了一种新的动态推理方案DynaTran,在运行时修剪激活,具有较低的开销,从而大大减少了无效操作的数量,提高了Transformer推理的吞吐量。我们进一步提出了沿着Transformer操作瓦片的矩阵的多样化数据流来提高数据重用,从而实现更高的能量效率。为了有效实现这些方法,我们提出了一种新颖的Transformer加速器体系结构AccelTran。通过不同模型和基准测试的广泛实验,证明DynaTran在达到高达1.2倍更高的稀疏度时,比最先进的硬件感知修剪策略获得了更高的精度。我们提出的加速器之一,AccelTran-Edge,与树莓派设备相比,实现了高达330K倍的吞吐量和93K倍的能量需求降低。另一方面,与最先进的Transformer协处理器Energon相比,AccelTran-Server实现了5.73倍的吞吐量提高和3.69倍的能量消耗降低。模拟源代码可在https://github.com/jha-lab/acceltran获得。

0
下载
关闭预览

相关内容

Transformer是谷歌发表的论文《Attention Is All You Need》提出一种完全基于Attention的翻译架构

知识荟萃

精品入门和进阶教程、论文和代码整理等

更多

查看相关VIP内容、论文、资讯等
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
65+阅读 · 2022年3月17日
专知会员服务
25+阅读 · 2021年4月2日
【ICLR2020】五篇Open代码的GNN论文
专知会员服务
47+阅读 · 2019年10月2日
ICLR'22 |「无图」的图神经网络
图与推荐
1+阅读 · 2022年8月25日
Hierarchically Structured Meta-learning
CreateAMind
24+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
27+阅读 · 2019年5月18日
Deep Compression/Acceleration:模型压缩加速论文汇总
极市平台
14+阅读 · 2019年5月15日
ICLR2019最佳论文出炉
专知
12+阅读 · 2019年5月6日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
无监督元学习表示学习
CreateAMind
27+阅读 · 2019年1月4日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
10+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
Arxiv
0+阅读 · 2023年6月13日
Arxiv
15+阅读 · 2022年1月24日
Heterogeneous Graph Transformer
Arxiv
27+阅读 · 2020年3月3日
VIP会员
相关资讯
ICLR'22 |「无图」的图神经网络
图与推荐
1+阅读 · 2022年8月25日
Hierarchically Structured Meta-learning
CreateAMind
24+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
27+阅读 · 2019年5月18日
Deep Compression/Acceleration:模型压缩加速论文汇总
极市平台
14+阅读 · 2019年5月15日
ICLR2019最佳论文出炉
专知
12+阅读 · 2019年5月6日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
无监督元学习表示学习
CreateAMind
27+阅读 · 2019年1月4日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
10+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
Top
微信扫码咨询专知VIP会员