arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2409.13975cs.ARcs.AIcs.LGcs.SYeess.SY
收藏

ProTEA:FPGA上的可编程Transformer编码器加速

ProTEA: Programmable Transformer Encoder Acceleration on FPGA

University of Arkansas(阿肯色大学);University of South Carolina(南卡罗来纳大学)

Ehsan Kabir, Jason D. Bakos, David Andrews, Miaoqing Huang

AI总结:

本文提出ProTEA,一种面向Transformer编码器密集计算的FPGA运行时可编程加速器,通过高效矩阵分块最大化并行性,在Xilinx Alveo U55C上实现接近最优性能,比GPU快2.5倍,比现有FPGA加速器快1.3至2.8倍。

摘要:

Transformer神经网络(TNN)已广泛应用于包括自然语言处理(NLP)、机器翻译和计算机视觉(CV)在内的多种领域。其广泛采用主要得益于多头自注意力模块的卓越性能,该模块用于从序列数据中提取关键特征。多头自注意力模块之后是前馈神经网络,在引入非线性以帮助模型学习复杂模式方面发挥着关键作用。尽管TNN很受欢迎,但针对这两个关键模块的硬件加速器数量有限。大多数先前的工作集中在稀疏架构上,对流行的TNN变体不够灵活。本文介绍了ProTEA,这是一种运行时可编程加速器,专为大多数最先进的transformer编码器的密集计算量身定制。ProTEA旨在通过最大化并行性来降低延迟。我们引入了大型矩阵的高效分块,可以在FPGA内的不同硬件组件之间分配内存和计算资源。我们在Xilinx Alveo U55C高性能数据中心加速卡上对ProTEA进行了运行时评估。实验结果表明,ProTEA可以托管各种流行的transformer网络,并在U55C上配置8个并行注意力头、12层和768的嵌入维度时,在多头自注意力块中使用64的分块大小,在前馈神经网络块中使用6的分块大小,实现接近最优的性能。提供了比较结果,显示ProTEA比NVIDIA Titan XP GPU快2.5倍。结果还表明,与当前最先进的定制FPGA加速器相比,它实现了1.3到2.8倍的加速。

英文摘要:

Transformer neural networks (TNN) have been widely utilized on a diverse range of applications, including natural language processing (NLP), machine translation, and computer vision (CV). Their widespread adoption has been primarily driven by the exceptional performance of their multi-head self-attention block used to extract key features from sequential data. The multi-head self-attention block is followed by feedforward neural networks, which play a crucial role in introducing non-linearity to assist the model in learning complex patterns. Despite the popularity of TNNs, there has been limited numbers of hardware accelerators targeting these two critical blocks. Most prior works have concentrated on sparse architectures that are not flexible for popular TNN variants. This paper introduces \textit{ProTEA}, a runtime programmable accelerator tailored for the dense computations of most of state-of-the-art transformer encoders. \textit{ProTEA} is designed to reduce latency by maximizing parallelism. We introduce an efficient tiling of large matrices that can distribute memory and computing resources across different hardware components within the FPGA. We provide run time evaluations of \textit{ProTEA} on a Xilinx Alveo U55C high-performance data center accelerator card. Experimental results demonstrate that \textit{ProTEA} can host a wide range of popular transformer networks and achieve near optimal performance with a tile size of 64 in the multi-head self-attention block and 6 in the feedforward networks block when configured with 8 parallel attention heads, 12 layers, and an embedding dimension of 768 on the U55C. Comparative results are provided showing \textit{ProTEA} is 2.5$\times$ faster than an NVIDIA Titan XP GPU. Results also show that it achieves 1.3 -- 2.8$\times$ speed up compared with current state-of-the-art custom designed FPGA accelerators.

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

↑