# Quantization-Aware Training (QAT)

- **Canonical URL:** https://getaimath.com/dictionary/quantization-aware-training-qat/
- **Topics:** [Quantization & Model Compression](https://getaimath.com/dictionary/category/quantization-and-model-compression/)
- **Last updated:** 2026-11-25

## What is Quantization-Aware Training (QAT)?

**In one sentence:** Quantization-aware training teaches a model during training to cope with low-precision numbers, so it loses less quality when quantized.

The model practices with simulated rounding while it learns, like an athlete training with ankle weights. When it is finally quantized, it is already used to the rounding, so it performs better than if quantized afterward.

![Quantization: Vacuum-Packing a Giant AI into a Carry-On Bag — Simple cartoon showing a huge 16 GB AI model with long fussy decimals (3.14159265) squeezed by a vacuum-seal press into a compact 4 GB model with rounded numbers (3.1) that fits on a laptop.](https://getaimath.com/diagrams/quantization-and-model-compression.png)
*Napkin Diagram (Quantization & Model Compression): By rounding long fussy decimals to neat short numbers, quantization shrinks a model about 4× with only a small loss in smarts.*

## What is an example of Quantization-Aware Training (QAT)?

Google released QAT versions of Gemma models that keep more quality at 4-bit.

## Why does Quantization-Aware Training (QAT) matter?

QAT gives the best quality for very small, compressed models.

## Quantization-Aware Training (QAT) vs. Post-Training Quantization (PTQ)

PTQ compresses an already finished model in minutes using a small calibration sample, whereas QAT simulates low-bit rounding during training so weights adapt to ultra-low bit widths.

| Dimension | Quantization-Aware Training (QAT) | [Post-Training Quantization (PTQ)](https://getaimath.com/dictionary/post-training-quantization-ptq/) |
| --- | --- | --- |
| Compute cost | Requires extra training epochs & full pipeline | Minutes to hours on 1 GPU |
| Sweet spot | Extreme 2-bit to 4-bit or tiny edge models | 8-bit and 4-bit compression (AWQ, GPTQ, GGUF) |
| Ease of use | Needs training data and compute budget | Drop-in on any open-weight checkpoint |

## Related Concepts

- [Post-Training Quantization (PTQ)](https://getaimath.com/dictionary/post-training-quantization-ptq/): Post-training quantization shrinks a model after it has finished training, without retraining it.
- [Weight Quantization](https://getaimath.com/dictionary/weight-quantization/): Weight quantization stores a model's learned weights in fewer bits.
- [Quantization](https://getaimath.com/dictionary/quantization/): Quantization makes a model smaller and faster by storing its numbers with fewer bits.
- [Activation Quantization](https://getaimath.com/dictionary/activation-quantization/): Activation quantization stores the temporary numbers that flow through a model while it runs in fewer bits.
- [Dynamic Quantization](https://getaimath.com/dictionary/dynamic-quantization/): Dynamic quantization decides how to scale activations on the fly, for each input, while the model runs.
- [Static Quantization](https://getaimath.com/dictionary/static-quantization/): Static quantization picks all the scaling settings ahead of time, using a sample of example data.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/quantization-aware-training-qat/)
