← 返回 JSSC 论文列表JSSC 2024第10期Digital Circuits
Ayaka: A Versatile Transformer Accelerator With Low-Rank Estimation and Heterogeneous Dataflow
Ayaka是一款多功能Transformer加速器,通过低秩估计和异构优化解决计算瓶颈问题。
无
Transformer加速器低秩估计异构优化稀疏预测随机投影
▸跨层稀疏预测方法:该方法通过随机投影(RP)实现注意力计算和线性层的联合稀疏化,显著提升不同输入长度下的计算效率,解决了传统Transformer中因输入长度变化导致的瓶颈不一致问题。技术贡献包括动态调整稀疏策略以适应不同层的工作负载特性。
▸基于随机投影的注意力计算稀疏化:利用随机投影技术对注意力计算进行稀疏化处理,减少计算复杂度,同时保持模型性能。该方法在长输入任务中特别有效,能够将注意力计算的开销降低至传统方法的1/10以下。
▸优化稀疏注意力计算的输入平移不变性:通过利用softmax的输入平移不变性特性,进一步优化稀疏注意力计算,减少冗余操作,提升计算效率。这一创新在硬件实现上显著降低了功耗和延迟。
▸异构数据流处理单元(HDPE)设计:动态调整片上数据驻留策略,根据当前计算需求最大化数据复用率,减少内存访问开销。这一系统创新使得Ayaka在多种任务中均能实现高能效,峰值能效达49.7 TOPS/W。
Abstract
Transformer model has demonstrated outstanding performance in the field of artificial intelligence. However, its remarkable performance comes at the cost of substantial compu- tational complexity, posing limitations on deploying transformers from cloud to edge due to power and throughput constraints. There are two main challenges in designing a transformer accel- erator for practical tasks. First, a transformer has inconsistent bottlenecks due to input length changes: for short inputs, such as using vision transformer (ViT) for ImageNet or bidirectional encoder representations from transformers (BERT) for general language understanding evaluation (GLUE), the linear layer of the model becomes the computational bottleneck. In contrast, for long inputs, such as high-resolution images or long-text tasks, attention computation becomes the bottleneck. Second, even for a given input length, different layers in the model exhibit various computational characteristics and workloads, such as matrix sizes and data reuse strategies. This article introduces Ayaka, a versatile transformer accelerator designed to address these issues. Ayaka uses a cross-layer sparse prediction approach based on random projection (RP), enabling simultaneous sparsification of attention computation and linear layers, thereby enhancing throughput for various bottlenecks for different input lengths. Furthermore, Ayaka optimizes the sparse attention computa- tion by leveraging the input translation invariance of s