SmoothQuant is a method that flattens activation outliers by migrating them to the weights, so that both weights and activations can be computed as 8-bit integers. It was proposed by Xiao et al. in 2022 and presented at ICML 2023. It is a post-training quantization (PTQ) method that requires no retraining.
When both weights and activations are 8-bit (W8A8), matrix multiplications can run on 8-bit integer arithmetic units, which not only reduces memory but also speeds up computation. In large language models (LLMs), however, very large values (outliers) appear in some channels of the activations, and plain W8A8 breaks accuracy. LLM.int8() kept accuracy by computing only the outlier dimensions in 16 bits, but this made computation slower.
SmoothQuant starts from two observations.
- Weights are easy to quantize; activations are hard. Weight distributions are known to be flat, and accuracy rarely drops even at 8 or 4 bits. Activation outliers, on the other hand, are about 100 times larger than the other values.
- Outliers keep appearing in fixed channels. If a channel has outliers, the same channel is large for almost every token.
So by dividing each activation channel to make its values smaller and multiplying the weights by the same amount, the quantization difficulty can be shifted from the activations to the weights without changing the result of the computation. The paper showed that OPT-175B, BLOOM-176B, GLM-130B, and others can be converted to W8A8 with almost no loss of accuracy.

