Quantization's Memory & Speed Multipliers

Quantization drastically shrinks LLM memory footprints by converting weights and activations from high-precision (e.g., FP32) to lower-precision formats (e.g., INT8, INT4), enabling up to 2x faster computation on GPUs like NVIDIA H100s, which process INT8 twice as fast as FP16.

The top 3

  1. Top Bit-Widths: Quantization's Memory/Speed Sweet Spot: 8-bit quantization reduces LLM memory by 50% with minimal quality loss (~1% accuracy drop), offering a 1.8x inference speedup. 4-bit quantization slashes memory by 75%, maintaining about 98.9% accuracy, and can boost speed by up to 2.4x for demanding tasks.
  2. Leading Quantization Methods for LLM Inference Speed: GPTQ and AWQ are prominent post-training quantization techniques; GPTQ balances speed and accuracy by iteratively quantizing weights, while AWQ optimizes for activation significance to achieve up to 4x memory reduction. Marlin, an optimized CUDA kernel, can further accelerate GPTQ and AWQ models by 2.6x and 10.9x respectively.
  3. Quantization's Impact on Popular LLMs: Real-World Gains: Quantizing Llama 2 7B to 4-bit can reduce its memory footprint from ~28GB to ~3.5GB, enabling deployment on consumer GPUs and achieving around 68 tokens/second. Mixtral 8x7B, originally requiring ~94GB VRAM, can run on a single A100 GPU with INT8 quantization, cutting inference costs in half and maintaining quality.

Sources

Open the full topic