Quantization represents numerical values using a smaller set of possible values, usually with fewer bits. In AI deployment it can reduce the memory used by model weights and, in some methods, activations or caches. It helps make models practical on constrained hardware.

The trade-off is approximation. A lower-precision representation cannot preserve every original value exactly. Whether that matters depends on the method, the model, and the task you test.

What becomes smaller?

A model with billions of weights needs space for those numbers. Storing each weight using fewer bits can reduce the weight footprint. The quantization scheme may also store scales or other metadata, and some tensors may remain at a higher precision.

Weight-only quantization changes weight representation while other parts of computation can use higher precision. Other approaches quantize activations too. A label such as “4-bit” therefore does not mean every operation and every buffer uses four bits. Transformers quantization overview

Two broad approaches

Post-training quantization converts a trained model. Some methods use representative calibration data to select a good approximation. Quantization-aware training accounts for quantization effects during training so the model can adapt to them.

Quantized base models can also be used in certain fine-tuning methods. QLoRA, for example, trains low-rank adapters while using a frozen quantized base model. That is a specific combination of techniques, not a rule that all quantized models can be trained in the same way. QLoRA paper

Memory reduction is not a speed guarantee

Lower precision can reduce data movement and allow a model to fit fully in accelerator memory. That can be valuable. But execution also depends on hardware support, kernels, conversion overhead, batch size, and which part of inference is the bottleneck.

For your own comparison, hold the model family and task constant where possible. Compare two quantizations using identical inputs and output limits. Record load success, peak memory where available, completion time, and the number of corrections needed.

Test difficult examples too. A short friendly answer may look unchanged while precise extraction, multilingual text, or a long-context task exposes a quality difference.

Quantization and distillation

Technique What changes? Example goal
Quantization Numerical representation, often keeping the architecture and parameter count Fit the model into available memory
Distillation A student learns selected behavior from a teacher Build a model suited to a smaller or narrower task

They can be combined. A distilled student can later be quantized. Neither label guarantees that the resulting model will meet your accuracy requirements.

Choose a practical starting point

Use a format supported by the runtime and hardware you actually have. Read the model card and runtime documentation rather than choosing only by filename. Quantization labels are not always directly comparable across tools.

Try a small evaluation set before downloading several large variants. Include the cases that would make you reject an output: an invented amount, a missing exception, or the wrong document reference.

Check your understanding

Does converting an eight-billion-parameter model to four-bit weights make it a two-billion-parameter model?

See the explanation

No. Quantization changes how numbers are represented. It usually leaves the parameter count unchanged, while reducing the storage used per parameter.