Quantization

Also: model quantization, INT8, INT4

Maps 32- or 16-bit floating-point values onto a small integer grid using per-tensor or per-channel scale factors. Post-training quantization needs only a small calibration set; quantization-aware training simulates the rounding during training to recover accuracy.

Example

A 7B-parameter model takes ≈28 GB in FP32, ≈14 GB in FP16, ≈7 GB in INT8 and ≈3.5 GB in INT4: each halving of bit-width halves the memory.

See it in the lesson: Model Optimization →

Related terms

More in Language & LLMs