Part 5 of Pruning and the Lottery Ticket
Why industry reaches for quantization and distillation first
Module 5 · 5 min read
Why industry reaches for quantization and distillation first
TL;DR
- Quantization and distillation keep models dense, so the gains show up on every chip. Pruning’s zeros need special support.
- INT4 cuts weight memory 4× with post-training methods (GPTQ, AWQ) in a few GPU hours, and speeds up memory-bound generation.
- Pruning pays with 2:4 hardware, prune-then-distill, channel pruning on edge CNNs, or memory-bound engines with sparse kernels.
The uncomfortable part
After four parts on pruning, I have to admit that in production it’s usually not the first tool. The “4-bit” open models you download are quantized, and small, fast app models are often distilled. Both keep the model dense, which runs fast on every existing chip and library. Pruning mostly gives you zeros that need special help to become speed (part 2).
Quantization: fewer bits per weight
Quantization stores each 16-bit weight in 8 bits (INT8) or 4 (INT4), plus a small scale factor shared by a group of weights. It’s a bit like rounding prices to the nearest dollar. Here’s why it wins.
- The savings are automatic. INT4 weights are a quarter the size, with no special pattern or index lists.
- It hits the real bottleneck. LLM generation spends most of its time reading weights from memory, so fewer bytes means faster tokens, even if the maths runs at higher precision.
- No retraining. GPTQ (Frantar et al., 2022, the same group as SparseGPT) and AWQ (Lin et al., 2023) get to 3–4 bits in a few GPU hours with a little calibration data. GPTQ quantized OPT-175B in about four.
- Support is everywhere. INT8 runs on almost every modern CPU, GPU and phone chip, and llama.cpp, vLLM and TensorRT-LLM ship quantized kernels.
Distillation: a small student copies a big teacher
Knowledge distillation, popularised by Hinton, Vinyals and Dean (2015), trains a small “student” on a large “teacher”’s full output probabilities instead of just the right answer. For example, a teacher saying “70% cat, 25% fox, 5% car” teaches that cats look a bit like foxes and nothing like cars. These “soft labels” carry so much more information that the student usually beats the same model trained on labels alone.
DistilBERT (Sanh et al., 2019) is 40% smaller and 60% faster than BERT and keeps 97% of its language-understanding performance, and it’s an ordinary dense model with no special kernels. Many small LLMs are now trained with help from bigger ones, and Minitron (part 4) uses distillation to recover after pruning.
Compare them yourself
Pick a model size to see weight memory under each approach, and what each one asks of you.
Even in a compact format, 50% pruning saves less than INT8 and far less than INT4, and only turns into speed with special support. INT4 is 4× smaller and standard tools already run it.
Why pruning loses (most of the time)
| Pruning (unstructured) | Quantization | Distillation | |
|---|---|---|---|
| Typical size cut | about 1.8× at 50% (with a bitmask) | 2× (INT8) to 4× (INT4) | whatever student size you choose |
| Real speedup | needs sparse kernels or 2:4 hardware | yes, on standard hardware | yes, it’s a smaller model |
| Training cost | none to a lot | little or none | a full training run of the student |
| Accuracy risk | falls off a cliff at high sparsity | small at 8 bit, manageable at 4 bit | depends on student size and data |
| Tooling | patchy | mature, everywhere | just training |
What is the State of Neural Network Pruning? (Blalock et al., 2020) found pruning papers hard to compare. Benchmarks and metrics were inconsistent, and many reported only parameter counts or FLOPs instead of real speed. Engineers care about latency and cost, and there quantization and distillation are easier to trust.
Where pruning does pay off
- 2:4 sparsity on NVIDIA GPUs, often with quantization, for models that are already highly tuned.
- Structured pruning + distillation to build a family of smaller models from one big one (Minitron, Sheared LLaMA). Pruning picks the starting shape and weights, and distillation heals.
- Edge and mobile CNNs, where channel pruning gives a smaller dense network for a phone chip.
- Memory-bound settings, where reading fewer bytes matters, if the inference engine has the right sparse kernels.
Wider hardware and engine support for sparse patterns would close the speed gap. For now, pruning pays where the pattern and hardware match.
My rule of thumb. To make serving cheaper, quantize first (fast, safe, supported everywhere). For a much smaller model, distill. Prune when the hardware rewards a pattern (2:4), or as the first step of prune-then-distill. And always measure real latency instead of counting zeros.
Quick check
Why does INT4 quantization often speed up LLM text generation though it removes no weights?
Each token reads almost every weight once but does little maths per byte, so memory bandwidth is the bottleneck. Fewer bytes per weight means faster reads, with no sparsity pattern needed.
Q&A
Can I use all three together?
Yes, and many production pipelines do. Distil or prune-and-distil to a smaller shape, then quantize. Deep Compression combined pruning and quantization back in 2016.
Does quantization ever hurt accuracy badly?
8-bit is usually close to lossless. At 4 bits GPTQ and AWQ keep quality close for most models, but very small models and some tasks suffer more. Below 4 bits quality drops faster.
Papers
- Hinton, Vinyals, Dean (2015). Distilling the Knowledge in a Neural Network.
- Sanh et al. (2019). DistilBERT.
- Frantar et al. (2022). GPTQ.
- Lin et al. (2023). AWQ: Activation-aware Weight Quantization.
- Blalock et al. (2020). What is the State of Neural Network Pruning?
- Muralidharan et al. (2024). Minitron.