Skip to main content
QUICK REVIEW

[Paper Review] Energon: Towards Efficient Acceleration of Transformers Using Dynamic Sparse Attention

Zhe Zhou, Junlin Liu|arXiv (Cornell University)|Oct 18, 2021
Advanced Neural Network ApplicationsComputer Science7 citations
TL;DR

Energon proposes a co-design framework that accelerates Transformers using dynamic sparse attention via a Mix-Precision Multi-Round Filtering (MP-MRF) algorithm, which identifies critical query-key pairs at runtime with low-precision operations and applies high-precision computation only to selected pairs. The approach achieves up to 168× speedup and 10⁴× energy reduction over CPU and GPU baselines on NLP and CV workloads.

ABSTRACT

In recent years, transformer models have revolutionized Natural Language Processing (NLP) and shown promising performance on Computer Vision (CV) tasks. Despite their effectiveness, transformers' attention operations are hard to accelerate due to the complicated data movement and quadratic computational complexity, prohibiting the real-time inference on resource-constrained edge-computing platforms. To tackle this challenge, we propose Energon, an algorithm-architecture co-design approach that accelerates various transformers using dynamic sparse attention. With the observation that attention results only depend on a few important query-key pairs, we propose a Mix-Precision Multi-Round Filtering (MP-MRF) algorithm to dynamically identify such pairs at runtime. We adopt low bitwidth in each filtering round and only use high-precision tensors in the attention stage to reduce overall complexity. By this means, we significantly mitigate the computational cost with negligible accuracy loss. To enable such an algorithm with lower latency and better energy efficiency, we also propose an Energon co-processor architecture. Elaborated pipelines and specialized optimizations jointly boost the performance and reduce power consumption. Extensive experiments on both NLP and CV benchmarks demonstrate that Energon achieves $168 imes$ and $8.7 imes$ geo-mean speedup and up to $10^4 imes$ and $10^3 imes$ energy reduction compared with Intel Xeon 5220 CPU and NVIDIA V100 GPU. Compared to state-of-the-art attention accelerators SpAtten and $A^3$, Energon also achieves $1.7 imes, 1.25 imes$ speedup and $1.6 imes, 1.5 imes $ higher energy efficiency.

Motivation & Objective

  • Address the high computational and memory overhead of self-attention in Transformers, especially on resource-constrained edge platforms.
  • Overcome limitations of prior sparse attention methods like SpAtten and A³, which suffer from fixed pruning strategies, high off-chip memory access, or require model retraining.
  • Enable efficient, dynamic, and hardware-aware attention computation that maintains high accuracy while drastically reducing complexity.
  • Design a co-processor architecture that efficiently accelerates the MP-MRF algorithm with optimized pipelines and memory access patterns.
  • Demonstrate the effectiveness of the approach across diverse NLP and CV benchmarks, including real-world deployment scenarios in cloud and edge environments.

Proposed method

  • Propose the Mix-Precision Multi-Round Filtering (MP-MRF) algorithm to dynamically identify important query-key pairs at runtime using low-bitwidth operations.
  • Apply low-precision (e.g., 4-bit) filtering in multiple rounds to progressively narrow down critical attention pairs, reducing the search space before high-precision attention computation.
  • Use high-precision (e.g., 16-bit) tensors only for the final attention computation on the filtered pairs, minimizing overall computational cost.
  • Design the Energon co-processor with specialized pipelines and memory optimizations to accelerate MP-MRF and sparse attention execution.
  • Implement a performance model to guide hardware configuration and analyze bottlenecks under varying workloads and core counts.
  • Integrate the Energon accelerator into both edge and server platforms (Energon-edge and Energon-server) to evaluate end-to-end performance and scalability.

Experimental results

Research questions

  • RQ1Can dynamic, runtime-identified sparse attention reduce computational complexity in Transformers without significant accuracy loss?
  • RQ2Can a mix-precision, multi-round filtering strategy effectively identify critical query-key pairs with minimal precision overhead?
  • RQ3How does the Energon co-processor architecture optimize memory access and pipeline efficiency for sparse attention workloads?
  • RQ4To what extent can Energon outperform state-of-the-art accelerators like SpAtten and A³ in both speed and energy efficiency across diverse NLP and CV tasks?
  • RQ5What is the scalability of Energon when increasing the number of processing cores, and where are the performance bottlenecks?

Key findings

  • Energon achieves a geo-mean speedup of 168× and energy reduction of 10⁴× over Intel Xeon 5220 CPU on cloud workloads, and 440× speedup with 2951× energy reduction over ARM-A72 CPU on edge platforms.
  • On NLP benchmarks, Energon achieves up to 8.7× speedup and 10³× energy reduction over NVIDIA V100 GPU, outperforming SpAtten and A³ in both performance and energy efficiency.
  • The MP-MRF algorithm reduces computation by 4× to 8× with negligible accuracy loss, enabling dynamic pruning without model retraining.
  • Energon-equipped systems show 1.21× lower end-to-end latency and 1.55× higher throughput due to offloaded, pipelined attention execution.
  • Scalability analysis shows that adding cores from 4 to 16 reduces end-to-end latency significantly, but performance gains plateau beyond 16 cores due to memory bandwidth limitations.
  • Compared to SpAtten, Energon achieves 16×, 8×, and 8× pruning on Task-A, C, and D respectively, while SpAtten only achieves 2× pruning without retraining, demonstrating superior sparsity and accuracy trade-offs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.