# Dynamic Quantization

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

## What is Dynamic Quantization?

**In one sentence:** Dynamic quantization decides how to scale activations on the fly, for each input, while the model runs.

Weights are quantized ahead of time, but activations are measured and quantized live. This adapts to each input but adds a little extra work.

![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 Dynamic Quantization?

A text model in PyTorch can use dynamic quantization to turn its linear layers to INT8 when running on a CPU.

## Why does Dynamic Quantization matter?

It is an easy way to speed up models without collecting calibration data.

## Related Concepts

- [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.
- [Static Quantization](https://getaimath.com/dictionary/static-quantization/): Static quantization picks all the scaling settings ahead of time, using a sample of example data.
- [Weight Quantization](https://getaimath.com/dictionary/weight-quantization/): Weight quantization stores a model's learned weights in fewer bits.
- [Mixed Precision](https://getaimath.com/dictionary/mixed-precision/): Mixed precision uses different number formats for different parts of a model or task, to balance speed and accuracy.
- [Quantization-Aware Training (QAT)](https://getaimath.com/dictionary/quantization-aware-training-qat/): Quantization-aware training teaches a model during training to cope with low-precision numbers, so it loses less quality when quantized.
- [Full Precision](https://getaimath.com/dictionary/full-precision/): Full precision usually means storing model numbers in 32-bit floating point, FP32.

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