LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale
Tim Dettmers Thanks: Majority of research done as a visiting researcher at Facebook AI Research. Mike Lewis Younes Belkada Luke Zettlemoyer University of Washington Facebook AI Research Hugging Face ENS Paris-Saclay
Abstract
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
原文 arXiv:2208.07339;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2208.07339v2