Quantization vs Distillation
38 sourced facts · updatedQuantization 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
| Quantization | Distillation | |
|---|---|---|
| What it changes | The 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 needs | Calibration 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 shrinks | Weight 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 lost | Some 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 wrong | Quantizing 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 it | Against 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] |
| Speed | Not 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]