paper-with-me

홈 › Papers

A Length Adaptive Algorithm-Hardware Co-design of Transformer on FPGA Through Sparse Attention and Dynamic Pipelining

2022-08-07 · Hongwu Peng, Shaoyi Huang, Shiyang Chen, Bingbing Li, Tong Geng, Ang Li, Weiwen Jiang, Wujie Wen, Jinbo Bi, Hang Liu, Caiwen Ding

Transformers are considered one of the most important deep learning models since 2018, in part because it establishes state-of-the-art (SOTA) records and could potentially replace existing Deep Neural Networks (DNNs). Despite the remarkable triumphs, the prolonged turnaround time of Transformer models is a widely recognized roadblock. The variety of sequence lengths imposes additional computing overhead where inputs need to be zero-padded to the maximum sentence length in the batch to accommodate the parallel computing platforms. This paper targets the field-programmable gate array (FPGA) and proposes a coherent sequence length adaptive algorithm-hardware co-design for Transformer acceleration. Particularly, we develop a hardware-friendly sparse attention operator and a length-aware hardware resource scheduling algorithm. The proposed sparse attention operator brings the complexity of attention-based models down to linear complexity and alleviates the off-chip memory traffic. The proposed length-aware resource hardware scheduling algorithm dynamically allocates the hardware resources to fill up the pipeline slots and eliminates bubbles for NLP tasks. Experiments show that our design has very small accuracy loss and has 80.2 $\times$ and 2.6 $\times$ speedup compared to CPU and GPU implementation, and 4 $\times$ higher energy efficiency than state-of-the-art GPU accelerator optimized via CUBLAS GEMM.

📄 PDF Abstract BibTeX arXiv:2208.03646

Code (0)

등록된 구현이 없습니다.

Tasks

CPUGPUSchedulingSentence

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Adam 설명 없음
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Position-Wise Feed-Forward Layer 설명 없음

Similar Papers 제목 키워드 기반

Low Power Vision Transformer Accelerator with Hardware-Aware Pruning and Optimized Dataflow

2025-10-16 · Ching-Lin Hsiung, Tian-Sheuan Chang arxiv

Current transformer accelerators primarily focus on optimizing self-attention due to its quadratic complexity. However, this focus is less relevant for vision transformers with short token lengths, where the Feed-Forward…

ANT: Exploiting Adaptive Numerical Data Type for Low-bit Deep Neural Network Quantization

2022-08-30 · Cong Guo, Chen Zhang, Jingwen Leng, Zihan Liu 외

Quantization is a technique to reduce the computation and memory cost of DNN models, which are getting increasingly large. Existing quantization solutions use fixed-point integer or floating-point types, which have limit…

Quantization

Looped Transformers for Length Generalization

2024-09-24 · Ying Fan, Yilun Du, Kannan Ramchandran, Kangwook Lee

Recent work has shown that Transformers trained from scratch can successfully solve various arithmetic and algorithmic tasks, such as adding numbers and computing parity. While these Transformers generalize well on unsee…

Parallelizing Linear Transformers with the Delta Rule over Sequence Length

2024-06-10 · Songlin Yang, Bailin Wang, Yu Zhang, Yikang Shen 외

Transformers with linear attention (i.e., linear transformers) and state-space models have recently been suggested as a viable linear-time alternative to transformers with softmax attention. However, these models still u…

Language ModelingLanguage ModellingMambaState Space Models

Adaptable Butterfly Accelerator for Attention-based NNs via Hardware and Algorithm Co-design

2022-09-20 · Hongxiang Fan, Thomas Chau, Stylianos I. Venieris, Royson Lee 외

Attention-based neural networks have become pervasive in many AI tasks. Despite their excellent algorithmic performance, the use of the attention mechanism and feed-forward network (FFN) demands excessive computational a…

CPUGPURaspberry Pi 4