AI & automation

What is quantization?

Quantization compresses an AI model by storing its weights with fewer bits, for example 4-bit instead of 16-bit numbers. The model needs far less memory and runs faster, with a small loss of accuracy.

The idea

A model is billions of numbers. Normally each takes 16 bits. Rounding them to 8 or 4 bits cuts memory by half to three-quarters, so a model that needed a datacenter GPU might run on a single consumer card or a laptop.

What you give up

Rounding adds noise. For most chat and classification tasks, 8-bit is nearly indistinguishable and 4-bit is often acceptable; but math, code and long reasoning chains can degrade more. Smaller models suffer more than larger ones from heavy compression.

Practical use

  • Choose a quantized build when hardware is the limit, as in on-prem or on-device deployments.
  • Always test on your own examples; published benchmarks may not reflect your task.
  • Compare against simply picking a smaller unquantized model. Quantization is applied to the finished model, unlike distillation, which trains a new smaller model.

Questions, answered

Slightly. Outputs may differ in wording and occasionally in accuracy, which is why you test.

Small ones, yes. Speed and battery use depend on the device and model size.

By the Stegnor team · Updated