arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.14705cs.ARcs.LG
收藏

AccelTran:一种面向Transformer动态推理的稀疏感知加速器

AccelTran: A Sparsity-Aware Accelerator for Dynamic Inference with Transformers

Princeton University(普林斯顿大学)

Shikhar Tuli, Niraj K. Jha

AI总结:

针对Transformer加速中计算开销高、硬件利用率低的问题,提出低开销动态剪枝方案DynaTran与分块数据流,设计稀疏感知加速器AccelTran,在准确率、稀疏度、吞吐量与能效上均优于现有方案。

摘要:

基于自注意力的Transformer模型已在自然语言处理领域取得巨大成功。尽管其性能优异,但由于二次计算复杂度和较大的激活值规模,Transformer的加速颇具挑战。现有Transformer加速器尝试通过剪枝token来减少内存访问,却带来了较高的计算开销。此外,以往研究直接对注意力运算涉及的大型矩阵进行操作,限制了硬件利用率。为解决这些问题,本研究提出了一种新型动态推理方案DynaTran,它能在运行时以低开销剪枝激活值,大幅减少无效运算的数量,从而提升Transformer推理的吞吐量。我们进一步提出对Transformer运算中的矩阵进行分块,并结合多种数据流来提升数据复用率,进而实现更高的能效。为有效实现这些方法,我们提出了AccelTran——一种新型的Transformer加速器架构。针对不同模型与基准的大量实验表明,DynaTran的准确率优于当前最先进的top-k硬件感知剪枝策略,同时稀疏度最高可提升1.2倍。我们提出的加速器之一AccelTran-Edge与Raspberry Pi设备相比,吞吐量提升了33万倍,能耗降低了9.3万倍。另一方面,AccelTran-Server与当前最先进的Transformer协处理器Energon相比,吞吐量提升了5.73倍,能耗降低了3.69倍。仿真源代码可在https://github.com/jha-lab/acceltran获取。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑