what is model quantization
Model quantization is a technique that shrinks an AI model by representing its internal numbers with less precision — for example, using 8-bit values instead of the 32-bit values a model might originally be trained with — reducing the model's size and computational demands, usually with only a small, carefully managed cost to accuracy.
```flowchart
{
"rows": [
{ "type": "nodes", "items": [
{ "title": "Trained model uses high-precision numbers", "sub": "e.g. 32-bit floating point weights", "tone": "blue" }
]},
{ "type": "arrow" },
{ "type": "group", "title": "Quantization reduces precision", "items": [
{ "title": "Weights converted to lower precision", "sub": "e.g. 8-bit integers instead of 32-bit floats", "tone": "green" }
]},
{ "type": "arrow" },
{ "type": "nodes", "items": [
{ "title": "Smaller, faster model", "sub": "fits more easily on constrained hardware, small accuracy tradeoff", "tone": "orange" }
]}
]
}
```
**Quantization works because many AI models are trained with far more numerical precision than they actually need for accurate results.** A model's internal weights are typically trained using high-precision floating-point numbers, but research has repeatedly shown that most of that precision isn't essential to the model's actual accuracy; converting those weights to a lower-precision format keeps the model performing nearly as well while dramatically reducing how much memory and computation it requires to store and run.
```svg
```
| Aspect | Original (high precision) | Quantized (lower precision) |
|---|---|---|
| Typical weight format | 32-bit floating point | 8-bit integer (or lower) |
| Model size | Larger | Significantly smaller |
| Memory bandwidth needed | Higher | Lower |
| Accuracy | Full baseline accuracy | Usually very close, with careful quantization |
**Quantization isn't a single one-size-fits-all technique, and how carefully it's applied determines how much accuracy is actually preserved.** Some approaches quantize a model after training with minimal further adjustment, while more careful approaches retrain or fine-tune the model specifically to compensate for the reduced precision — the amount of care put into quantization directly affects the tradeoff between how much smaller and faster the model becomes and how much accuracy it retains.
**Quantization is one of the key techniques that makes running AI models on phones, laptops, and other edge devices practical at all.** Because on-device hardware has far less memory and compute available than a data-center server, a full-precision model that runs fine in the cloud may simply be too large or too slow to run acceptably on a phone — quantization, often combined with other compression techniques, is frequently what closes that gap and makes local, on-device AI genuinely usable.
**Not every part of a model benefits equally from quantization, which is why more advanced approaches quantize different parts of a model differently.** Some layers or components of a model are more sensitive to reduced precision than others, so sophisticated quantization schemes may keep certain critical parts at higher precision while quantizing less sensitive parts more aggressively — a mixed-precision approach that aims to capture most of the size and speed benefit while protecting the parts of the model where reduced precision would hurt accuracy the most.
Read model quantization through a precision-budget lens: rather than treating every number in a model as needing maximum precision, quantization asks how much precision each part actually needs to produce accurate results, and spends the model's computational and memory budget accordingly — which is exactly the kind of tradeoff that makes running powerful AI models on smaller, more constrained hardware possible.