hyperlakeDiscuss a deployment ↗
Videos · 2:59

Quantization Explained

Quantization explained: learn how lower-precision weights reduce LLM memory and bandwidth demands, and when to choose 8-bit, 4-bit, FP8, PTQ, or QAT.

In the full article

  1. What is model quantization?
  2. How do post-training quantization and quantization-aware training differ?
  3. How should teams choose a quantization approach for LLM inference: 8-bit, 4-bit or FP8?
  4. Why can quantization make inference faster?
  5. How Hyperlake helps
  6. Frequently asked questions
Read the transcript

Auto-generated captions; wording may contain recognition errors.

Every weight in a standard language model is stored as [music] a 16- bit floatingoint number. That precision is what makes training stable and accurate. It is also what makes large models expensive [music] to serve because loading billions of 16bit values from GPU memory on every [music] inference pass demands enormous memory bandwidth. Quantization is the [music] technique that reduces that cost by representing those weights in fewer bits. Trading a small amount of numerical precision for a large reduction in memory footprint and inference speed. The mechanism is straightforward. Instead of storing each weight as a 16 bit float, quantization maps those [music] values to a lower precision format, typically 8 bit integers or 4bit [music] integers. The model's mathematical structure stays the same. The number of parameters stays the same. What changes is how much memory each parameter occupies and how [music] quickly the hardware can move those values around. A model quantized to 4bit [music] precision occupies roughly a quarter of the memory of its 16bit counterpart. Which means a model that previously [music] required multiple high-end GPUs can now run on one. or a model that ran on a server GPU can now run on consumer hardware. There are two [music] points in a model's life cycle where quantization can be applied. Post-training quantization converts a [music] model after it has been fully trained, which is fast and requires no additional training [music] data, but carries a higher risk of accuracy degradation at very low bit widths. Quantizationaware training incorporates the lower [music] precision into the training process itself, allowing the model to adapt [music] to the reduced representation, which typically preserves more quality, [music] but requires significantly more compute upfront. The quality trade-off scales [music] with how aggressively you compress. 8bit quantization is widely considered nearly lossless for most tasks and is compatible with most production hardware. [music] 4-bit quantization requires more careful calibration but is now well supported in production serving [music] frameworks. Below 4 bits, quality degradation accelerates and the techniques required to preserve accuracy [music] become significantly more complex. Quantization does not reduce the number of operations the model performs. It reduces the memory required to store and move the values those operations [music] work on, which for inference workloads is often the binding constraint. FP8 [music] quantization has become the standard format for both training and inference at Frontier Labs, representing the field's convergence on a precision level that captures most of the memory and speed benefits while preserving the numerical stability that training [music] requires.

Start with a workload. Build the environment around it.

Explore example deployments, or see how the platform assembles, deploys, governs and operates the stack.