Skip to main content
QUICK REVIEW

[Paper Review] FTRANS: Energy-Efficient Acceleration of Transformers using FPGA

Bingbing Li, Santosh Pandey|arXiv (Cornell University)|Jul 16, 2020
Natural Language Processing TechniquesComputer Science18 references7 citations
TL;DR

FTRANS proposes an energy-efficient FPGA-based acceleration framework for Transformer models using enhanced block-circulant matrix (BCM)-based model compression and custom hardware architecture. It achieves up to 16× model size reduction with minimal accuracy loss and delivers 27.07× higher throughput and 81× better energy efficiency than CPU, outperforming GPU by 8.80× in energy efficiency.

ABSTRACT

In natural language processing (NLP), the "Transformer" architecture was proposed as the first transduction model replying entirely on self-attention mechanisms without using sequence-aligned recurrent neural networks (RNNs) or convolution, and it achieved significant improvements for sequence to sequence tasks. The introduced intensive computation and storage of these pre-trained language representations has impeded their popularity into computation and memory-constrained devices. The field-programmable gate array (FPGA) is widely used to accelerate deep learning algorithms for its high parallelism and low latency. However, the trained models are still too large to accommodate to an FPGA fabric. In this paper, we propose an efficient acceleration framework, Ftrans, for transformer-based large scale language representations. Our framework includes enhanced block-circulant matrix (BCM)-based weight representation to enable model compression on large-scale language representations at the algorithm level with few accuracy degradation, and an acceleration design at the architecture level. Experimental results show that our proposed framework significantly reduces the model size of NLP models by up to 16 times. Our FPGA design achieves 27.07x and 81x improvement in performance and energy efficiency compared to CPU, and up to 8.80x improvement in energy efficiency compared to GPU.

Motivation & Objective

  • To address the challenge of deploying large, compute-intensive Transformer models on energy- and memory-constrained edge devices.
  • To reduce the model size of pre-trained NLP models like BERT and RoBERTa without significant accuracy degradation.
  • To design a low-power, high-throughput FPGA architecture that efficiently accelerates compressed Transformer models.
  • To achieve superior energy efficiency and performance compared to CPU and GPU implementations.

Proposed method

  • Proposes an enhanced BCM-based weight representation to compress Transformer model weights at the algorithm level, minimizing accuracy degradation.
  • Introduces a two-stage optimization approach to schedule computation and mitigate resource constraints on FPGA.
  • Designs a custom FPGA architecture with optimized dataflow and resource utilization to support compressed models.
  • Employs high-level synthesis (HLS) with Xilinx SDx 2017.1 to automate FPGA implementation and optimize parallelism.
  • Applies quantization alongside BCM compression to further reduce model size and improve hardware efficiency.
  • Uses batch size adaptation and latency/power trade-off analysis to determine optimal configuration for throughput and energy efficiency.

Experimental results

Research questions

  • RQ1Can enhanced BCM-based compression effectively reduce the size of large-scale Transformer models with minimal accuracy loss?
  • RQ2How can FPGA-based acceleration be optimized to achieve high throughput and low latency for compressed NLP models?
  • RQ3What is the energy efficiency and performance gain of FPGA-based inference compared to CPU and GPU for Transformer models?
  • RQ4Can the proposed framework enable deployment of large NLP models on low-power embedded devices?

Key findings

  • FTRANS achieves up to 16× model compression for NLP models like RoBERTa with only minimal accuracy degradation.
  • The FPGA implementation achieves 27.07× higher throughput and 81× better energy efficiency compared to CPU on the IMDB benchmark.
  • Compared to GPU (RTX 5000), FTRANS reduces power consumption by 5.01× and improves energy efficiency by 8.80×.
  • On embedded Jetson TX2, FTRANS delivers 2.44× better energy efficiency than the embedded GPU.
  • The optimal batch size for latency-to-power ratio is 8, balancing throughput and energy consumption.
  • Resource utilization on FPGA remains low, with only 6,531 DSPs and 452,661 LUTs used for RoBERTa (base), enabling deployment on compact FPGAs.

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.