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

**Authors:** Tim Dettmers, Mike Lewis, Younes Belkada, Luke Zettlemoyer  
**arXiv:** [2208.07339](https://arxiv.org/abs/2208.07339)  
**Date:** 2022-08-15  
**Summary page:** https://www.summarizepaper.com/en/paper/2208.07339v1/

## Key points

- Large language models have revolutionized natural language processing but require significant GPU memory for inference
- LLM.int8() is a procedure developed by researchers to address this issue
- LLM.int8() cuts the memory needed for inference by half while retaining full precision performance
- The researchers were able to load a 175B parameter checkpoint, convert it to Int8, and use it immediately without any performance degradation
- LLM.int8() uses a two-part quantization procedure using vector-wise quantization with separate normalization constants for each inner product in the matrix multiplication to quantize most of the features
- For emergent outliers, a new mixed-precision decomposition scheme isolates outlier feature dimensions into a 16-bit matrix multiplication while still more than 99.9% of values are multiplied in 8-bit
- Outlier features were defined based on their magnitude compared to other features within the model and analyzed for their effect on model performance
- LLM.int8() makes large language models more accessible by reducing GPU memory requirements during inference

## Summary

The development of large language models has revolutionized natural language processing, but their inference requires significant GPU memory. To address this issue, a team of researchers has developed LLM.int8(), a procedure for Int8 matrix multiplication for feed-forward and attention projection layers in transformers. This method cuts the memory needed for inference by half while retaining full precision performance. The researchers were able to load a 175B parameter 16/32-bit checkpoint, convert it to Int8, and use it immediately without any performance degradation. The success of LLM.int8() is due to the researchers' understanding and working around properties of highly systematic emergent features in transformer language models that dominate attention and transformer predictive performance. They developed a two-part quantization procedure using 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, they also included a new mixed-precision decomposition scheme that isolates the outlier feature dimensions into a 16-bit matrix multiplication while still more than 99.9% of values are multiplied in 8-bit. To find these outlier features, the researchers used an empirical approach and defined outliers based on their magnitude compared to other features within the model. By analyzing these outlier features, they were able to gain insight into how they affect model performance. Overall, LLM.int8() makes large language models much more accessible by reducing GPU memory requirements during inference which makes it possible to use OPT-175B/BLOOM on a single server with consumer GPUs without any performance degradation.
