Skip to main content
QUICK REVIEW

[Paper Review] Model Quantization and Hardware Acceleration for Vision Transformers: A Comprehensive Survey

Dayou Du, Gu Gong|arXiv (Cornell University)|May 1, 2024
CCD and CMOS Imaging SensorsEngineering3 citations
TL;DR

This survey provides a comprehensive analysis of model quantization and hardware acceleration techniques for Vision Transformers (ViTs), focusing on low-bit inference. It systematically evaluates quantization methods, hardware-friendly algorithm design, and specialized accelerators, demonstrating that sub-8-bit quantization with co-designed hardware can achieve high throughput (e.g., 1181.5 GOP/S on FPGA) while preserving model accuracy.

ABSTRACT

Vision Transformers (ViTs) have recently garnered considerable attention, emerging as a promising alternative to convolutional neural networks (CNNs) in several vision-related applications. However, their large model sizes and high computational and memory demands hinder deployment, especially on resource-constrained devices. This underscores the necessity of algorithm-hardware co-design specific to ViTs, aiming to optimize their performance by tailoring both the algorithmic structure and the underlying hardware accelerator to each other's strengths. Model quantization, by converting high-precision numbers to lower-precision, reduces the computational demands and memory needs of ViTs, allowing the creation of hardware specifically optimized for these quantized algorithms, boosting efficiency. This article provides a comprehensive survey of ViTs quantization and its hardware acceleration. We first delve into the unique architectural attributes of ViTs and their runtime characteristics. Subsequently, we examine the fundamental principles of model quantization, followed by a comparative analysis of the state-of-the-art quantization techniques for ViTs. Additionally, we explore the hardware acceleration of quantized ViTs, highlighting the importance of hardware-friendly algorithm design. In conclusion, this article will discuss ongoing challenges and future research paths. We consistently maintain the related open-source materials at https://github.com/DD-DuDa/awesome-vit-quantization-acceleration.

Motivation & Objective

  • Address the challenge of deploying Vision Transformers (ViTs) on resource-constrained devices due to their large model size and high computational demands.
  • Systematically analyze the unique architectural and runtime characteristics of ViTs that complicate quantization and hardware acceleration.
  • Compare state-of-the-art quantization techniques for ViTs, emphasizing accuracy preservation and hardware efficiency.
  • Explore hardware accelerator designs tailored for quantized ViTs, focusing on data reuse, low-precision operations, and throughput optimization.
  • Identify open challenges and future research directions in sub-8-bit quantization, multi-method compression, and robustness generalization.

Proposed method

  • Conduct a vertical comparison of quantization techniques across different ViT variants, analyzing their accuracy, bit-width, and hardware compatibility.
  • Survey hardware accelerators optimized for quantized ViTs, including FPGA-based (e.g., ZCU102) and ASIC designs, focusing on custom units for Softmax and LayerNorm.
  • Evaluate accelerator performance using metrics like GOP/S and frame rate compliance, with a focus on data movement optimization and memory efficiency.
  • Introduce a unified framework for data packaging and on-/off-chip storage management to reduce latency and improve throughput.
  • Analyze hardware-friendly algorithmic strategies such as integer-only quantization, log2 quantization of exponentials, and Power-of-Two Factor quantization.
  • Propose a co-design methodology that aligns algorithmic choices (e.g., quantization scheme) with hardware capabilities (e.g., tensor cores, systolic arrays).

Experimental results

Research questions

  • RQ1What are the key architectural and computational bottlenecks in ViTs that complicate low-bit quantization and hardware acceleration?
  • RQ2How do different quantization techniques (e.g., W8A8, W4A8, W1A8) affect ViT accuracy and hardware efficiency across various ViT variants?
  • RQ3What hardware design patterns (e.g., systolic arrays, unified data packaging, dynamic memory management) enable high-throughput inference for quantized ViTs?
  • RQ4Why does sub-2-bit quantization lead to significant accuracy degradation in ViTs compared to CNNs, and how can this be mitigated?
  • RQ5What are the most promising integration strategies between quantization and other compression methods (e.g., pruning, knowledge distillation) for ViTs?

Key findings

  • Quantized ViTs achieve high inference throughput, with Auto-ViT-Acc reaching 1181.5 GOP/S on FPGA ZCU102 using W8A8 + W4A8 quantization.
  • Hardware accelerators like SOLE achieve high efficiency through custom E2Softmax and AILayerNorm units, using 4-bit intermediate representations and 16-entry lookup tables.
  • Sub-8-bit quantization (e.g., W4A8) shows minimal accuracy loss in PTQ, indicating strong feasibility for low-power edge deployment.
  • Integer-only quantization strategies simplify computation and improve compatibility with edge devices, especially in FPGA-based accelerators.
  • The use of dynamic on-/off-chip data storage and ping-pong buffers significantly enhances throughput and reduces latency in accelerator pipelines.
  • Significant accuracy degradation (>10%) occurs in sub-2-bit ViT quantization, highlighting a key challenge compared to CNNs, which remain near-lossless at similar bit-widths.

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.