SmoothQuant is a training-free, post-training quantization technique for large language models. It addresses activation outliers by applying a mathematically equivalent, per-channel scaling transformation that shifts quantization difficulty from activations to weights, enabling INT8 quantization of both weights and activations. section 9.2
SmoothQuant is useful when conventional quantization stops meeting deployment constraints:
- Targets larger models where systematic activation outliers commonly degrade quantization quality, especially beyond roughly 6–7 billion parameters. section 9.2
- Avoids the hardware inefficiency of mixed-precision approaches that retain activation outliers in FP16 while using INT8 elsewhere. section 9.2
- Can reduce memory usage by 50% and increase speed by up to 1.56 times, with minimal accuracy loss in reported experiments. section 9.2
- Replaces standard linear layers with INT8-capable components rather than requiring additional model training. section 9.5
Quantizing OPT with W8A8
A PyTorch workflow loads the OPT-2.7B model, obtains activation scales from a validation dataset, smooths the model with an alpha value of 0.5, and replaces relevant layers with W8A8Linear modules. On one reported evaluation, naive W8A8 accuracy was 0.423 versus 0.799 after SmoothQuant, compared with 0.798 for the FP16 model. section 9.2
Figure 9.3 A high-level explanation of SmoothQuant
Use the high-level transformation diagram to follow how channel scaling smooths activations before weights and activations are quantized. section 9.2
