INT8 / INT4 Quantization

Category: Generative AI / LLM

Quantization methods that represent model weights or activations using 8-bit or 4-bit integers instead of the standard 16-bit or 32-bit floating-point numbers.

Full Explanation

INT8 and INT4 quantization refer to reducing model weight and/or activation precision to 8-bit or 4-bit integer representations respectively. INT8 quantization typically preserves nearly all model quality while halving memory usage compared to FP16, making it suitable for production deployment with minimal quality trade-off. INT4 quantization provides 4x compression from FP16 with more noticeable but often acceptable quality degradation, enabling very large models to fit on consumer hardware. Both can be applied post-training (PTQ) or during training (QAT). Key considerations include whether to quantize weights only or both weights and activations, and how to handle outlier values that are difficult to represent at low precision. LLM.int8() introduced mixed-precision decomposition to handle outlier features in INT8 quantization. These quantization levels represent the most common precision targets for LLM deployment optimization.

Related Terms

More in Generative AI / LLM

Explore More