Distillation vs. Quantization vs. Pruning — Three Roads to a Smaller Model
There are three roads to a smaller model: coarsen the number grid (quantization), remove weights outright (pruning), or rebuild the thing at a smaller size (distillation). A head-to-head comparison on compression ratio, accuracy, and implementation cost — and why, when you stack them, training-based methods go first and quantization goes last.
Distilling the Knowledge in a Neural Network
Primary source — what this article is built on
undefined2026-08-29
Distilling the Knowledge in a Neural NetworkarXiv:1503.02531Paper page·PDFLearning both Weights and Connections for Efficient Neural NetworksarXiv:1506.02626Paper page·PDF
Deep Compression: Compressing Deep Neural Networks with Pruning"arXiv:1510.00149Paper page·PDF
https://arxiv.org/abs/1510.00149"Trained Quantization and Huffman Coding
DistilBERT"arXiv:1910.01108Paper page·PDF
a distilled version of BERT: smallera distilled version of BERT: smaller
fasterfaster
https://arxiv.org/abs/1910.01108"cheaper and lighter
GPTQ: Accurate Post-Training Quantization for Generative Pre-trained TransformersarXiv:2210.17323Paper page·PDF
SparseGPT: Massive Language Models Can Be Accurately Pruned in One-ShotarXiv:2301.00774Paper page·PDF
Three ways to lighten a load
Say you want to move house with fewer boxes. You have three options.
You can lower the fidelity of what you keep: re-save every photo in the album at a coarser resolution. The count stays the same; only the bytes shrink. You can throw away what you never use: the pot you haven't touched in three years goes, and the pile physically shrinks. Or you can look at everything and rebuild: lay it all out, decide what this life actually requires, and assemble a smaller kit from scratch.
Shrinking a neural network maps onto those three options with surprising precision. In order: quantization, pruning, and distillation. This article puts all three on the same table. The goal isn't to go deep on any one of them — it's to answer two practical questions: which one fits your situation, and if you use several, in what order.
What each one actually removes
Let's fix the vocabulary first, because the three techniques delete genuinely different things.
Quantization lowers the bit width of the numbers that represent weights and activations. A weight stored in 16 bits (fp16) gets stored in 4 instead. The parameter count does not change at all, and neither does the shape of the model. Only bytes-per-weight goes down.
Pruning removes weights — either by zeroing individual entries, or by deleting whole heads, channels, or layers. The surviving weights keep their full precision; there are simply fewer of them.
Distillation trains a different, smaller model (the student) using the outputs of the large one (the teacher) as its target. Layer count, hidden width, vocabulary, even the architecture itself are all yours to choose. You aren't modifying the original model; you're rebuilding it.
In one line: quantization cuts precision, pruning cuts count, distillation rebuilds. That difference is what produces every entry in the table below.
Head to head on three axes
| Quantization | Pruning | Distillation | |
|---|---|---|---|
| What shrinks | Bits per weight | Number of weights | The model itself |
| Typical compression | 2–4× (16 → 8/4 bits) | Depends on method and tolerated loss (unstructured goes further) | Anything — you design the student |
| How accuracy degrades | Gradually, then a cliff below some bit width | Worse the sparser you go; structured hurts more | Depends on student capacity; a bad design loses a lot |
| Data needed | A few hundred calibration samples (PTQ) | Calibration to full retraining | Lots — sometimes generated by the teacher |
| Compute needed | Minutes to hours on one GPU | Hours, plus retraining | A full training run. The heaviest by far |
| Does it get faster? | Usually yes, especially when bandwidth-bound | Hardware-dependent. This is the big trap | Yes, reliably — it really is a smaller model |
| Can it change the shape? | No | Partly (whole layers/heads) | Completely |
The row to stare at is the second-to-last one. "Smaller" and "faster" are not synonyms. Quantization shrinks what sits in memory and shrinks the bytes you read per step, so in the bandwidth-bound generation phase it translates directly into speed. Pruning, as we'll see, buys you nothing at all unless the zeros you created are in a form where the hardware can actually skip the work. Get this wrong in a design doc and you'll discover it only after the implementation lands and nothing improved.
Before going further, it's worth feeling what "coarsening the grid" does. The mechanism is essentially the same one JPEG uses.
Note the shape: it doesn't degrade smoothly. It holds up to a point, then drops off a cliff. All three techniques behave this way.
Quantization — the cheapest option, and the one to try first
Underneath, quantization is a division and a rounding step that maps a range of real numbers onto an evenly spaced grid. For the simplest symmetric scheme:
Here is the original weight, is the bit budget, and is the grid spacing (scale). In words, equation (1) says only this: pick the spacing so that the largest weight in the group lands exactly on the largest representable integer, then round everything else onto that grid. What you store is the rounded integers plus one per group.
Comments
Sign in to comment