I-BERT: Integer-only BERT Quantization

By Sehoon Kim, A. Gholami, Zi-Mei Yao, Michael W. Mahoney, Kurt Keutzer. 2021

459 citations recorded by the source corpus.

Transformer based models, like BERT and RoBERTa, have achieved state-of-the-art results in many Natural Language Processing tasks. However, their memory footprint, inference latency, and power consumption are prohibitive efficient inference at the edge, and even at the data center. While quantization can be a viable solution for this, previous work on quantizing Transformer based models use floating-point arithmetic during inference, which cannot efficiently utilize integer-only logical units such as the recent Turing Tensor Cores, or traditional integer-only ARM processors. In this work, we propose I-BERT, a novel quantization scheme for Transformer based models that quantizes the entire inference with integer-only arithmetic. Based on lightweight integer-only approximation methods for nonlinear operations, e.g., GELU, Softmax, and Layer Normalization, I-BERT performs an end-to-end integer-only BERT inference without any floating point calculation. We evaluate our approach on GLUE downstream tasks using RoBERTa-Base/Large. We show that for both cases, I-BERT achieves similar (and slightly higher) accuracy as compared to the full-precision baseline. Furthermore, our preliminary implementation of I-BERT shows a speedup of 2.4-4.0x for INT8 inference on a T4 GPU system as compared to FP32 inference. The framework has been developed in PyTorch and has been open-sourced.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Hardware and Architecture, Large Language Models, Efficiency & Compression

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Kurt Keutzer
  2. A. Gholami
  3. Michael W. Mahoney
  4. Zi-Mei Yao
  5. Tijmen Blankevoort
  6. Zhen Dong
  7. Dan Alistarh
  8. Song Han

In Computer Vision and Pattern Recognition

  1. Kurt Keutzer
  2. Michael W. Mahoney
  3. A. Gholami
  4. Jianfei Cai
  5. Luc Van Gool
  6. Zi-Mei Yao
  7. Jitendra Malik
  8. Dacheng Tao

In Hardware and Architecture

  1. Kurt Keutzer
  2. Zi-Mei Yao
  3. Michael W. Mahoney
  4. A. Gholami
  5. Sehoon Kim
  6. Tijmen Blankevoort
  7. Yelysei Bondarenko
  8. Markus Nagel

In Large Language Models

  1. A. Gholami
  2. Jitendra Malik
  3. Song Han
  4. Michael W. Mahoney
  5. Kurt Keutzer
  6. Fisher Yu
  7. Sehoon Kim
  8. Yunchen Zhang

In Efficiency & Compression

  1. Kurt Keutzer
  2. A. Gholami
  3. Zi-Mei Yao
  4. Michael W. Mahoney
  5. Tijmen Blankevoort
  6. Dan Alistarh
  7. Zhen Dong
  8. Sehoon Kim

Citations in the corpus