Frontier Foundry

Quantization vs Distillation

38 sourced facts · updated

Quantization or distillation: how should you shrink a model?

They shrink a model in different ways. Quantization keeps the model and rounds its weights to fewer bits, so the same checkpoint fits on a smaller card. Distillation trains a smaller model on a larger teacher's outputs, so the student mimics the teacher with fewer parameters. The sources show them used together: after a model is rounded, distilling the original into it heals the loss. [1][2][3][4][5]

In the knowledge graph: The healing vat is a teacher and a student: the original model teaches the rounded one by its logits.

The difference between Quantization and Distillation

QuantizationDistillation
What it changesThe precision of a checkpoint's weights: blocks of weights are rounded around a shared scale, and the quality comes down to the data format, which layers are quantized, and calibration. [1][6]Which model you serve: a smaller student is trained on the answers and reasoning of a larger, more capable teacher and learns to mimic it. [3][7]
What it needsCalibration on sample inputs. One set of 4-bit builds is described as post-training quantization only, with no quantization-aware training or distillation. [8][9]A body of lessons from the teacher: distillers generate millions of responses. The official R1 distills reportedly used about 700k samples. [3][10]
How much it shrinksWeight storage: NVIDIA reports a 550B model's checkpoint going from 1,121 GB in BF16 to 352.3 GB in its NVFP4 mixed-precision recipe, 3.2x smaller. An image pipeline's peak memory went from 24 GB to 12 GB with a 4-bit transformer. [2][11]The model itself: Microsoft Research reports a 22M-parameter tile encoder distilled from a billion-parameter teacher within 3% of the original at roughly 50 times less compute. [12]
What gets lostSome fidelity, and it is disputed how much. NVIDIA says its NVFP4 model matches BF16 on nearly every benchmark; Sam Rose finds 4-bit a noticeable step down, closer to 90% of the original. A 2-bit setup judged indistinguishable from 4-bit broke tool calling. [13][14][15]What the teacher cannot pass on: on-policy distillation steers the student without expanding its capability ceiling, it gets harder as the student shrinks, and a distilled model may do worse in general if tuned to a narrow set of benchmarks. [16][17][18]
How it goes wrongQuantizing the wrong parts: the gate projections of a recurrent block, thought fragile, turned out the least sensitive in one test, and lower weight error did not mean a better model, so a scale method should be scored on downstream benchmarks. [19][20]A thin or mismatched lesson: variants distilled on only 4k to 10k teacher samples were reported to change style rather than capability, and a large teacher-student gap steers the student the wrong way. [21][22]
How to check itAgainst the full model: KL divergence and top-1 accuracy. SemiAnalysis cautions that saturated evals can make quantized models look fine while end users see worse output. [23][24]Against the base model and a benchmark: compare the student with its base before shipping, for example on SWE-bench Verified. [21][25]
SpeedNot automatic: most Diffusers quantization backends are weight-only, which saves memory but usually does not make inference faster. Running the layers at 4-bit weights and activations does speed up the denoising loop. [26][27]The aim: capture the large model's reasoning offline and let smaller and faster models serve it. [4]

When to use Quantization

  • You want the same model on smaller hardware. A modern text-to-image model in BF16 often needs 20 to 30 GB of VRAM, out of reach of most consumer GPUs, and a 17GB 4-bit build of a 27B model runs on one laptop. [28][29]
  • You do not want to train anything: post-training quantization needs only calibration, and one team reports a 20% throughput gain from quantizing more of a model with benchmark quality kept. [8][30]

When to use Distillation

  • You need a model with far fewer parameters, built for one job. The 22M-parameter tile encoder was within 3% of its billion-parameter teacher on slide-level pathology benchmarks at roughly 50 times less compute. [12][4]
  • You can record a strong teacher's reasoning: transcripts of its reasoning are the most valuable distillation data, and exact traces generally beat summaries. [31][32]

Using Quantization and Distillation together

Quantization builds on distillation. Quantization-aware distillation distills the frozen full-precision teacher into the quantized model, which recovers loss that rounding caused, so the rounding can be pushed harder. NVIDIA aims post-training quantization at 95 to 99% median accuracy recovery for this reason. On an early Nemotron 3.5 Lightning checkpoint, median recovery went from 96.33% with aggressive W4A16 post-training quantization to 99.72% with 200 iterations of distillation, at the same 21.19 GB. Distilling into a quantized student on short sequences lost long-context accuracy. [5][33][34][35][36]

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

The sources disagree. NVIDIA says its NVFP4 Nemotron 3 Ultra matches BF16 accuracy on nearly every benchmark, and a healed 4-bit model is said to have beaten its own 16-bit source on some benchmarks. Others find 4-bit a noticeable step down, or say claims of lossless 4-bit rest on KL divergence over a small corpus while long-context coding shows a clear drop. [13][37][14][38]

Each one on its own

from their concept pages

What is Quantization?

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.

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.

16 elements per scale
Block size of the NVFP4 format whose per-block scale localizes outliers, as the paper reports Hugging Face
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
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

Quantization, explained in full: how it works as a machine, every part and its sources.

What is Distillation?

Distillation teaches a small model from a large one's answers and reasoning. The student writes its own tries, the teacher marks them, and the student is compared with what it was before. Done well it keeps much of the quality at a fraction of the cost; too few lessons leave it worse than it started.

In this corpus distillation is a small model learning from a large model's outputs: questions go to the teacher, its answers and reasoning traces are recorded, and the student is trained on them (offline, or on its own tries marked token by token by the teacher). How much the student gets depends on how much of the teacher is captured (full traces beat summaries), on how closely teacher and student match, and on how many lessons there are. The corpus also covers distilling through someone else's API, and the defences and dispute about it.

80.4% vs 71.8%
SWE-bench Verified score of a pretrained model trained on the teacher's full reasoning transcripts vs only summarized ones (Anthropic's test) Anthropic
14 of 17 pairs
Teacher-student pairs (1.5B to 235B parameters) where distilling from the initial student's offline rollouts beat on-policy distillation, by up to +13.6% accuracy and 11.4x training speedup Hugging Face

Distillation, explained in full: how it works as a machine, every part and its sources.

In AI coverage over the last four weeks, Quantization took 2.4% and Distillation 1.6%. Quantization, week by week

The facts behind this page

38 facts from the two knowledge packs
  1. 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 · 2026-08-03 · Quantization
  2. 1,121 GB to 352.3 GB: Nemotron 3 Ultra (550B) checkpoint size, BF16 against NVFP4 mixed-precision recipe, 3.2x smaller, reported by NVIDIA. nvidia · 2026-06-26 · Quantization
  3. Distillers generate millions of responses from a larger, more capable model and use them to teach a smaller model to mimic it. Anthropic · 2026-10-12 · Distillation
  4. The aim of distilling is to capture the large model's reasoning offline and let smaller and faster models serve it. Raghav Saboo, AI Engineer · 2026-06-29 · Distillation
  5. 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 · 2026-08-25 · Quantization
  6. A block's quantization scale is set by its largest entries, so an outlier leaves the typical entries in the block with only a narrow range of values to land on. Hugging Face · 2026-09-17 · Quantization
  7. The model that produces the training data is called the teacher, and the model that learns from it is called the student. OpenAI · 2026-11-20 · Distillation
  8. 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 · 2026-08-20 · Quantization
  9. For the PTQ of Nemotron 3.5 Lightning, NVIDIA tried calibration sequence lengths from 8k to 128k and found 32K gave the best result for four-over-six, so it ran every QAD experiment on that 32K-calibrated checkpoint. Calibration used 1,000 samples on one DGX B300. nvidia · 2026-08-17 · Quantization
  10. Official R1 distills reportedly used about 700k samples, large enough to affect behavior and benchmarks. AINews · 2026-06-18 · Distillation
  11. 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 · 2026-07-23 · Quantization
  12. within 3% at roughly 50 times less compute: Slide-level pathology benchmarks: GigaPath-Flash (a 22M-parameter tile encoder distilled from a billion-parameter teacher) against the original GigaPath, reported by Microsoft Research Naoto Usuyama, Jeya Maria Jose Valanarasu, Tristan Naumann, microsoft · 2026-08-31 · Distillation
  13. Is a 4-bit model always a little worse than the original? No: NVIDIA says the NVFP4 Nemotron 3 Ultra matches BF16 accuracy on nearly every benchmark. nvidia · 2026-06-26 · Quantization
  14. Is a 4-bit model always a little worse than the original? Yes: Sam Rose finds 4-bit is a noticeable step down, closer to 90% of the original. Simon Willison, Simon Willison · 2026-03-26 · Quantization
  15. 2-bit experts broke tool calling. Dan Woods first ran Qwen3.5-397B with 2-bit experts; Claude judged it indistinguishable from 4-bit, but Simon Willison found those evals thin, and the 2-bit version broke tool calling. The 4-bit upgrade (209GB, 4.36 tok/s) fixed it. Simon Willison, Simon Willison · 2026-03-18 · Quantization
  16. On-policy distillation steers the student toward correct reasoning paths with dense token-level guidance, without expanding the capability ceiling. Hugging Face · 2026-07-17 · Distillation
  17. Distilling gets harder as the student shrinks: R1 distilled into smaller Qwen2.5 models scores lower on AIME, MATH and GPQA the smaller the student, and Epoch would be surprised by a student a hundred times smaller that kept the teacher's breadth. Anson Ho, epoch · 2026-04-08 · Distillation
  18. Distilled models may be tuned to a narrow set of benchmarks and do worse in general; Epoch cites OpenAI's mini models doing worse on tasks that need much knowledge recall. Anson Ho, epoch · 2026-04-08 · Distillation
  19. Protect the sensitive layers at higher precision, or quantize everything? Quantize every linear layer, even the gates of the recurrent block: the supposedly fragile gate projections turned out the least sensitive. Hugging Face · 2026-09-04 · Quantization
  20. Lower weight error did not mean a better model. On Nemotron 3 Ultra, MSE calibration cut per-tensor weight error 27.1% against four-over-six but gave no consistent improvement on downstream benchmarks. nvidia · 2026-06-26 · Quantization
  21. The thin copy is worse than the base. Open-model variants distilled from a frontier model on only 4k to 10k teacher samples were reported to change style rather than capability and to degrade the base model; one external test saw more hallucination and slower runs. The official R1 distills had used about 700k samples. AINews · 2026-06-18 · Distillation
  22. A large teacher-student gap makes the guiding signal misalign with task correctness and steers the student the wrong way. Hugging Face · 2026-07-17 · Distillation
  23. The builders of one set of 4-bit files frame their evaluation around KL divergence and top-1 accuracy against the full model, at the same file size as other providers. AINews · 2026-08-20 · Quantization
  24. SemiAnalysis cautions that GSM8k-style evals are saturated and that QAT or post-training calibration to popular sets can make quantized models look fine on evals while end users see worse output; on DeepSeek R1 it measured FP8 very slightly above FP4. semianalysis · 2026-02-16 · Quantization
  25. The student was benchmarked by training a pretrained model on teacher transcripts and testing it on SWE-bench Verified. Anthropic · 2026-10-12 · Distillation
  26. 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 · 2026-07-23 · Quantization
  27. SVDQuant runs the main transformer layers with 4-bit weights and activations, which reduces memory and also speeds up the denoising loop. Hugging Face · 2026-07-23 · Quantization
  28. A modern text-to-image model in BF16 often needs 20-30 GB of VRAM, out of reach of most consumer GPUs. Hugging Face · 2026-07-23 · Quantization
  29. 17GB file: Size of the 4-bit build of a 27B model that runs on one laptop, as the blogger reports Simon Willison, Simon Willison · 2026-08-16 · Quantization
  30. +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 · 2026-08-03 · Quantization
  31. Transcripts of the teacher's reasoning are the most valuable distillation data: much more useful than the output alone. Anthropic · 2026-10-12 · Distillation
  32. After supervised fine-tuning, a student trained on exact reasoning traces generally outperformed one trained on reasoning summaries. OpenAI · 2026-11-20 · Distillation
  33. With quantization-aware distillation in the loop, NVIDIA aims PTQ at 95-99% median accuracy recovery instead of over 99%: push the PTQ student hard enough to bank size and latency gains and leave a visible gap for distillation to close. nvidia · 2026-08-17 · Quantization
  34. 96.33% to 99.72%: Median score recovery against BF16 on an early Nemotron 3.5 Lightning checkpoint, aggressive W4A16 PTQ against 200 iterations of QAD, both 21.19 GB against 65.85 GB BF16, reported by NVIDIA. nvidia · 2026-08-17 · Quantization
  35. In quantization-aware distillation the PTQ checkpoint is expected to lose a little (median accuracy recovery of 95 to 99%) because distilling the frozen full-precision teacher into it afterwards recovers the rest, so quantize harder than a PTQ-only recipe would. nvidia · 2026-08-17 · Distillation
  36. Distilling into a quantized student on short sequences lost long-context accuracy: NVIDIA's ablations needed training sequences as long as the 522K used in SFT, after starting with 256K to save compute. nvidia · 2026-08-17 · Distillation
  37. Is a 4-bit model always a little worse than the original? 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 · 2026-08-25 · Quantization
  38. Is a 4-bit model always a little worse than the original? Yes in practice: a Hacker News user says lossless-4-bit claims rest on KL divergence over a small corpus, and long-context coding shows a clear drop. Aurornis, Hacker News · 2026-07-03 · Quantization

Cite this page

the version of 2026-12-02
APA
Han, R. (2026, December 2). Quantization vs Distillation: what is the difference?. Frontier Foundry. https://www.ryanhan.ai/compare/quantization-vs-distillation
BibTeX
@misc{han2026-compare-quantization-vs-distillation,
  author       = {Han, Ryan},
  title        = {{Quantization vs Distillation: what is the difference?}},
  howpublished = {Frontier Foundry},
  year         = {2026},
  month        = dec,
  url          = {https://www.ryanhan.ai/compare/quantization-vs-distillation}
}

More comparisons

all of them