Abstract
Transformer models excel at natural language processing tasks but are challenging to deploy on edge devices due to high memory and computation demands. To address this, we proposed an energy- and area-efficient transformer accelerator. We identify ‘0’ bits in positive and ‘1’ bits in negative 2’s complement activation values as bipolar sparsity. This form of sparsity shares a larger proportion than the traditional bit-level sparsity in transformer models. We propose a bipolar sparsity compressor (BSC) together with a bipolar processing element (BPE) to detect and skip the bipolar sparsity in a bit-group (BG) level during the inference. It reduces a large proportion of ineffective computations and improves throughput. The significant sparsity scheduling (SSS) dynamically adjusts broadcast settings based on BG-level sparsity ratios, balancing the sparsity skipping and memory access. Furthermore, an importance approximate gating (IAG) filters out unimportant tokens/heads during the attention computation by reusing sparsity information from the BSC, further reducing processing latency and energy consumption. Implemented in a 28nm process, the proposed accelerator achieves $7.62\times $ and $12.43\times $ throughput improvements on RoBERTa-B and GPT2-xl, respectively. The area efficiency reaches up to 3.51 TOPS/mm2 due to skipping a large proportion of bipolar sparsity, reaching $4.83\times$ and $5.85\times $ higher compared with the state-of-the-art approximate computing accelerator and the computing in memory accelerator on the benchmark model.
Funding Information
  • Macau Science and Technology Development Fund, Macau, (0160/2022/A)
  • Macau Science and Technology Development Fund, Macau, (004/2023/SKL)
  • Universidade de Macau (MYRGGRG2023-00012-IME)
  • Hetao Shenzhen-Hong Kong Science and Technology Innovation Cooperation Zone project (HTHZQSWS-KCCYB-2023030)
  • Department of Science and Technology of Guangdong Province and FDCT, Macau (0040/2024/AGJ)
  • Zhuhai Science and Technology Innovation Bureau (2220004002683)

This publication has 15 references indexed in Scilit: