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

FAMOUS:面向超大规模FPGA的Transformer注意力机制灵活加速器

FAMOUS: Flexible Accelerator for the Attention Mechanism of Transformer on UltraScale+ FPGAs

Department of EECS, University of Arkansas, Fayetteville(电子工程与科学系,阿肯色大学,费耶特维尔)

Ehsan Kabir, Md. Arafat Kabir, Austin R. J. Downey, Jason D. Bakos, David Andrews, Miaoqing Huang

AI总结:

FAMOUS是一种面向超大规模FPGA的Transformer注意力机制加速器,通过高效矩阵分块和资源分配,实现高吞吐量和低延迟,优于CPU、GPU和现有FPGA加速器。

摘要:

Transformer神经网络(TNNs)正被应用于越来越多的应用领域,包括自然语言处理(NLP)、机器翻译和计算机视觉(CV)。其受欢迎程度主要归功于在分析序列数据和提取特征时多头自注意力块的出色性能。截至目前,针对该机制的硬件加速器有限,这是在为完整模型设计加速器之前的首要步骤。本文提出FAMOUS,一种针对FPGA上的密集多头注意力(MHA)计算的灵活硬件加速器。它被优化为高利用处理元素和片上内存,以提高并行性和减少延迟。已采用高效的矩阵分块方法,将内存和计算资源分布在不同模块上各种FPGA平台。该设计在Xilinx Alveo U55C和U200数据中心卡(含Ultrascale+ FPGA)上进行评估。实验结果表明,它可以在U55C上达到最大吞吐量、并行注意力头数、嵌入维度和分块大小分别为328(十亿操作/秒(GOPS))、8、768和64。此外,它比Intel Xeon Gold 5220R CPU和NVIDIA V100 GPU分别快3.28倍和2.6倍,也比目前最先进的FPGA加速器快1.3倍。

英文摘要:

Transformer neural networks (TNNs) are being applied across a widening range of application domains, including natural language processing (NLP), machine translation, and computer vision (CV). Their popularity is largely attributed to the exceptional performance of their multi-head self-attention blocks when analyzing sequential data and extracting features. To date, there are limited hardware accelerators tailored for this mechanism, which is the first step before designing an accelerator for a complete model. This paper proposes \textit{FAMOUS}, a flexible hardware accelerator for dense multi-head attention (MHA) computation of TNNs on field-programmable gate arrays (FPGAs). It is optimized for high utilization of processing elements and on-chip memories to improve parallelism and reduce latency. An efficient tiling of large matrices has been employed to distribute memory and computing resources across different modules on various FPGA platforms. The design is evaluated on Xilinx Alveo U55C and U200 data center cards containing Ultrascale+ FPGAs. Experimental results are presented that show that it can attain a maximum throughput, number of parallel attention heads, embedding dimension and tile size of 328 (giga operations/second (GOPS)), 8, 768 and 64 respectively on the U55C. Furthermore, it is 3.28$\times$ and 2.6$\times$ faster than the Intel Xeon Gold 5220R CPU and NVIDIA V100 GPU respectively. It is also 1.3$\times$ faster than the fastest state-of-the-art FPGA-based accelerator.

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

↑