Course contentsShow
← Machine Learning and Deep Learning
Lesson 2631 of 3,53857. Model Compression: QuantizationFree lesson

What is Post-Training Quantization?

Understand PTQ as converting trained model weights to lower precision without retraining, and why it's the simplest quantization approach.

What is Post-Training Quantization?

You'll learn what Post-Training Quantization (PTQ) is and why it's the simplest way to compress a trained neural network.

The Core Idea

Post-Training Quantization is exactly what it sounds like: you take an already trained model and convert its weights (and optionally activations) from high precision (usually 32-bit floating point) to lower precision (like 8-bit integers) without any retraining.

Think of it like compressing a finished photo. You've already taken the picture, edited it perfectly, and now you just want to reduce the file size for storage or sharing. You're not going back to reshoot or re-edit—you're simply converting the existing data to a more compact format.

Why PTQ is the Simplest Approach

Unlike Quantization-Aware Training (QAT), which requires modifying your training loop and running additional epochs, PTQ requires:

  • ✅ No retraining
  • ✅ No access to training data (in some variants)
  • ✅ No modifications to training code
  • ✅ Minimal time investment

You simply load your trained model, apply a quantization function, and you're done. The trade-off? PTQ typically results in slightly more accuracy loss compared to QAT because the model wasn't trained with quantization in mind.

The Process

PTQ works by calibrating quantization parameters (scale and zero-point) using either:

  • Statistical analysis of weight distributions
  • A small calibration dataset to measure activation ranges
  • Simple min-max range calculations

This allows the model to map high-precision values to lower-precision integers efficiently.

Key Takeaway: Post-Training Quantization is the fastest, simplest quantization method—converting trained weights to lower precision without retraining—making it ideal for quick deployment when moderate accuracy trade-offs are acceptable.