LLM.int8(): The Outlier-Aware 8-bit Quantization Breakthrough

LLM.int8() revolutionized 8-bit quantization by dynamically adapting to retain higher precision for sensitive components. It quantizes most features using vector-wise quantization but extracts and multiplies outliers in 16-bit, combining results with 8-bit multiplications to minimize accuracy loss while achieving a 2x memory saving.

The top 3

  1. LLM.int8() vs. 8-bit Rivals: Accuracy Breakthroughs: LLM.int8() excels over traditional 8-bit quantization by using an 'outlier-aware' mixed-precision decomposition, processing critical outlier features in FP16 while the rest runs in INT8. This method prevents the significant accuracy degradation seen in naive 8-bit approaches that fail for models over 6.7 billion parameters.
  2. Solving the 'Outlier Problem': Why LLM.int8() Was Essential: Before LLM.int8(), naive 8-bit quantization caused large language models (over 6.7B parameters) to produce 'gibberish' outputs because a few 'outlier' values (50-100x larger) in feature channels distorted the entire quantization scale. LLM.int8() identified and solved this problem by isolating and preserving the precision of these critical outliers.
  3. LLM.int8()'s Top Memory & Speed Gains for Large Models: LLM.int8() significantly reduces memory footprint by half compared to 16-bit models, making models up to 175 billion parameters runnable on consumer GPUs. While its primary benefit is accessibility, it also enables potential speedups as integer arithmetic can be 2-3 times faster and memory bandwidth is halved.

Sources

Open the full topic