Glossary · Memory, precision and compute

Quantization

Also: INT4INT8FP8GGUFQ4_K_MQ8_0GPTQAWQ4-bit

Read it at the depth you need: one sentence · a paragraph · the math · in the models here

1In one sentence

Storing weights (and sometimes the KV cache) in fewer bits, 8 or 4 instead of 16, with a scale per block of weights, to cut memory and speed up memory-bound decoding.

2In a paragraph

Quantization rounds each weight to one of a few levels: 256 at 8 bits, 16 at 4 bits. To keep the error small the weights are split into blocks (often 32 to 128) and each block gets its own scale, so the levels fit that block's range. At 8 bits the loss in quality is usually negligible; at 4 bits it is small for large models and more noticeable for small ones. Since generating a token mostly means reading every weight from memory once, fewer bytes also means faster decoding.

3The math, shapes and parameters

A block of 32 weights w with one 16-bit scale s (GGUF's Q4_0, roughly):

s = max|w| / 7,   qi = round(wi / s) ∈ [−8, 7],   ŵi = s · qi  → (32 × 4 + 16) / 32 = 4.5 bits a weight

So the real size is more than "half a byte per parameter": Q8_0 is 8.5 bits, Q4_0 4.5, the popular Q4_K_M about 4.8 (it keeps some tensors at higher precision). GPTQ and AWQ pick the rounding to minimize the error on sample data, with a scale (and zero point) per group of 128. FP8 (E4M3) is a float format that recent GPUs compute in directly; DeepSeek-V3 was trained in it. MXFP4 and NVFP4 are 4-bit float formats with a shared scale per small block.

4In the 96 models on this site

The weights at 16, 8.5 and 4.5 bits per weight (what the GPU pages use), for the largest model of ten series:

ModelParametersBF168-bit4-bit
Kimi K21.03T2.05 TB1.09 TB577 GB
Ling-1T1000B2 TB1.06 TB562 GB
Inkling947B1.89 TB1.01 TB533 GB
GLM-5.2743B1.49 TB790 GB418 GB
DeepSeek-V3.2672B1.34 TB714 GB378 GB
Nemotron 3 Ultra 550B-A55B549B1.1 TB584 GB309 GB
Llama 3.1 405B406B812 GB431 GB228 GB
Llama 4 Maverick (17B-128E)401B801 GB426 GB225 GB
Qwen3.5 397B-A17B396B793 GB421 GB223 GB
GLM-4.5353B706 GB375 GB198 GB

Introduced in Dettmers et al., “LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale” (2022).

Related

BF16 (bfloat16) · MXFP4 and NVFP4 · KV cache · Parameters · every term