LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale

By Tim Dettmers, Michael Lewis, Younes Belkada, Luke S. Zettlemoyer. 2022

1,133 citations recorded by the source corpus.

Large language models have been widely adopted but require significant GPU memory for inference. We develop a procedure for Int8 matrix multiplication for feed-forward and attention projection layers in transformers, which cut the memory needed for inference by half while retaining full precision performance. With our method, a 175B parameter 16/32-bit checkpoint can be loaded, converted to Int8, and used immediately without performance degradation. This is made possible by understanding and working around properties of highly systematic emergent features in transformer language models that dominate attention and transformer predictive performance. To cope with these features, we develop a two-part quantization procedure, LLM.int8(). We first use vector-wise quantization with separate normalization constants for each inner product in the matrix multiplication, to quantize most of the features. However, for the emergent outliers, we also include a new mixed-precision decomposition scheme, which isolates the outlier feature dimensions into a 16-bit matrix multiplication while still more than 99.9% of values are multiplied in 8-bit. Using LLM.int8(), we show empirically it is possible to perform inference in LLMs with up to 175B parameters without any performance degradation. This result makes such models much more accessible, for example making it possible to use OPT-175B/BLOOM on a single server with consumer GPUs. We open-source our software.

Subfields: Artificial Intelligence, Electrical and Electronic Engineering, 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. Luke S. Zettlemoyer
  2. Mohit Bansal
  3. Percy Liang
  4. Jianfeng Gao
  5. Yejin Choi
  6. Hannaneh Hajishirzi
  7. Noah A. Smith
  8. Graham Neubig

In Electrical and Electronic Engineering

  1. Dan Alistarh
  2. Elias Frantar
  3. Tim Dettmers
  4. Luke S. Zettlemoyer
  5. Torsten Hoefler
  6. Song Han
  7. Saleh Ashkboos
  8. Ji Lin

In Hardware and Architecture

  1. Dan Alistarh
  2. Elias Frantar
  3. Jared Casper
  4. Mohammad Shoeybi
  5. Jie Tang
  6. Ion Stoica
  7. Torsten Hoefler
  8. Saleh Ashkboos

In Large Language Models

  1. Luke S. Zettlemoyer
  2. Jie Tang
  3. Danqi Chen
  4. Tim Dettmers
  5. Timo Schick
  6. Dan Alistarh
  7. Percy Liang
  8. Elias Frantar

In Efficiency & Compression

  1. Dan Alistarh
  2. Elias Frantar
  3. Luke S. Zettlemoyer
  4. Tim Dettmers
  5. Kurt Keutzer
  6. Song Han
  7. Torsten Hoefler
  8. Alexander M. Rush

Citations in the corpus