Frontier Foundry

Quantization

The Power Plant · Inference & Serving

Storing weights in fewer bits to make models smaller and faster.

Also called: quantized, quantize, FP8, FP4, NVFP4, MXFP4, INT4, INT8, GGUF, 4-bit, 8-bit. In the glossary.

How it works, as a machineThe Bench House · checkpoints

Follow one checkpoint from a 16-bit file to a 4-bit file on the card, in a model depot, its bench house and the card bay beside it.

  1. Run the samples
  2. Pick the layers
  3. Round to four bits
  4. Pack the file
  5. Load on the card
Play Quantization

Quantization in plain words

Quantization stores each of a model's weights with fewer bits, for example four instead of sixteen. The model shrinks and runs faster on smaller hardware. A little accuracy is lost with each cut, so the work is finding how far to round before the answers get worse.

An analogy

Rounding prices to the nearest coin. The ledger gets much shorter and adding up is quicker, and for most bills nobody notices. Round to the nearest banknote and the totals start to come out wrong.

How Quantization connects

11 typed relations in the knowledge graph

Builds on

  • Distillation: The healing vat is a teacher and a student: the original model teaches the rounded one by its logits.
  • KV Cache: The cache beside the weights competes for the same video memory, and can be rounded too.
  • On-Device & Local Models: A file that fits a laptop or a phone card is what makes a model run on the device.

Built on by

  • Inference Serving: Smaller weights make each decode step cheaper to load, at some risk to quality.
  • Fast Inference: A smaller weight file means fewer bytes through the pump for every token.
  • KV Cache: Squeezing the blocks to fewer bits is quantization applied to the cache instead of the weights.
  • Mixture of Experts: Experts are most of the weights, so 3-bit and 4-bit experts decide what fits in the cellar.
  • On-Device & Local Models: The RAM module holds weights packed to 8 or 4 bits so that a model fits the RAM of a phone.
  • Open-Weight Models: The quantizing compressor is quantization: the weights squeezed to fewer bits to fit a smaller machine.
  • Small Language Models: The press is quantization: weights packed into fewer bits.

Makes possible

Often in the same sources

On-Device & Local Models, Speculative Decoding, Fast Inference, Inference Serving, Mixture of Experts, KV Cache

See Quantization in the knowledge graph

Who is behind Quantization

people, labs, products and models

Named in its facts

What the sources say

3 parts · 10 sources · updated 2026-11-27

Sources describe quantization as a short line a checkpoint goes down: calibrate on sample inputs, pick which layers get four bits, round each block of weights around a shared scale, then heal against the original model and pack a file that has to fit on a card. The break is a rounded model that is quietly worse; the fix is healing, at the cost of a training pass.

Bench house: from a 16-bit checkpoint to blocks of four bits

Three stations the checkpoint meets before it is rounded: the calibration bench finds where the outliers sit, the layer board picks which layers get four bits, and the block-scale press rounds every block of weights around one scale.

  1. The calibration bench runs sample inputs through the model to find where its outlier weights sit.
  2. The layer board marks which layers get four bits and which keep more precision.
  3. The block-scale press rounds each block of 16 weights to four bits around one shared scale.
16 elements per scale
Block size of the NVFP4 format whose per-block scale localizes outliers, as the paper reports Hugging Face
+20% throughput
Throughput gain one team reports after quantizing more of one model with errors that cancel, with benchmark quality kept (an episode description) Latent Space
17.5 GiB
Size of the smallest 4-bit recipe the paper compares, for a 27B hybrid model with all 496 linear layers in NVFP4 Hugging Face
  • A Baseten engineer says the lossy part of inference is quantization, and quality comes down to the data format, which layers are quantized, and calibration on the quantized weights so that the outliers are preserved. Latent Space
  • Open models are not released in NVFP4, so Baseten redoes the quantization and calibrates it to check it does not regress the model before serving it. Latent Space
  • A set of 4-bit file builds is described as post-training quantization only: no quantization-aware training or distillation, and no training on the calibration dataset. AINews

Open questionProtect the sensitive layers at higher precision, or quantize everything?

  • Do not quantize the layers the user sees or the model reads its conditions from (output projections, modulation): find which layers can take four bits and keep the rest. Latent Space
  • Quantize every linear layer, even the gates of the recurrent block: the supposedly fragile gate projections turned out the least sensitive. Hugging Face

Proving room: healing the 4-bit blocks against the original

Two stations that tell how much the rounding cost and win it back: a healing vat that distills the original model's logits into the 4-bit weights, and a divergence gauge that reads the gap.

  1. The healing vat distills the original model's logits into the 4-bit weights until they stop drifting.
  2. The divergence gauge reads how far the 4-bit model's answers sit from the original's.
about 100 steps against 700
Steps for healing by distilling the teacher's logits (QAH) to reach its peak, against quantization-aware training, on a 9B model as the authors report Hugging Face
7 of 9 benchmarks
Benchmarks on which the healed 4-bit 60B model beats its own bfloat16 version, as its authors report Hugging Face
nearly 19 points lost
Average score quantization-aware training sheds by step 1,200 after its peak, on a 9B model as the authors report Hugging Face
  • Most efficiency pipelines compress the architecture, quantize the compressed weights, and then heal the damage; methods differ only in the healing step. Hugging Face
  • Quantization-aware training puts fake-quantization operators into the forward pass and keeps fine-tuning on a task loss; the authors call it costly and say it can become unstable if it runs past its best point. Hugging Face
  • Quantization-aware distillation matches a frozen full-precision teacher's output logits with a KL-divergence loss, which works when only the bits changed. Hugging Face

When it breaksHealing by retraining collapsed past its peak. The authors report that quantization-aware training reached its best average around step 700 and then collapsed, losing nearly 19 points by step 1,200, so a checkpoint has to be stopped early against a held-out signal. Hugging Face

Open questionIs a 4-bit model always a little worse than the original?

  • Quantization is lossy, and a higher score for a 4-bit model is noise: the aim is fidelity as near to 100% of the original as possible. Latent Space
  • A healed 4-bit model can beat its own 16-bit source: quantization stops being a tax and becomes a chance to teach the model. Hugging Face

Card bay: from blocks to a file on a card

Two stations at the end: a file crate that packs the 4-bit blocks and their scales into one file, and the card bay where that file has to fit in video memory next to the cache.

  1. The file crate packs the 4-bit blocks and their scales into one file a fraction of the original size.
  2. The card bay loads the file onto a card, where it has to fit in video memory beside the cache.
12 GB against 24 GB
Peak memory of an image pipeline with a 4-bit transformer, against the same pipeline in BF16, as the Hugging Face post reports Hugging Face
17GB file
Size of the 4-bit build of a 27B model that runs on one laptop, as the blogger reports Simon Willison
4.9 TB to 397 GB
Size a 2.4T-parameter model is said to shrink to under dynamic 1-bit quantization, as one company claims in a newsletter AINews
TPS cut by more than half
Drop in decode tokens per second from quantizing the KV cache to four bits with the polar-coordinate method, as the speaker says Philip Kiely
  • The blogger runs a 17GB Q4_K_M build of a 27B model in LM Studio on a 128GB MacBook and on a DGX Spark. Simon Willison
  • A modern text-to-image model in BF16 often needs 20-30 GB of VRAM, out of reach of most consumer GPUs. Hugging Face
  • Most Diffusers quantization backends are weight-only: they store low-precision weights and dequantize them at compute time, which saves memory but usually does not make inference faster. Hugging Face

When it breaksA 4-bit model fails at tool calls. A guest says customers with their own post-trained models need tool calling that parses JSON reliably, and that if the post-training or the quantization done after it is not good, the model struggles to read the JSON and call the tool. Latent Space

Sources

10 in all

More in Inference & Serving

The Power Plant: the whole area
  • Inference ServingRunning models efficiently for many users: batching, scheduling, hardware use.
  • Speculative DecodingA small model drafts tokens and the big model checks them in one pass, for faster output.
  • KV CacheMemory of past tokens' attention keys and values, the main memory cost of long contexts.
  • On-Device & Local ModelsRunning models on phones and laptops instead of in the cloud.
  • Token Economics & PricingWhat tokens cost, how fast prices fall, and how that shapes products.
  • Fast InferenceVery high tokens-per-second serving (Cerebras, Groq, fast modes).