GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
arXiv preprint

Compact Language Models via Pruning and Knowledge Distillation

NVIDIA prunes a trained 15B model to 8B and 4B and distills it back with under 3% of the original data. The 8B rivals models trained on trillions of tokens, and the recipe comes as ten rules.

Breakdown by FDE Interviews · 12 min read · Updated

About the original · 2024
AUTHORS
Muralidharan, Sreenivas, Joshi, Chochowski, et al.
FROM
NVIDIA
PUBLISHED
Jul 2024 · arXiv preprint
CITED BY
203Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 21% of this breakdown.

01

The paper in one minute

Instead of training an 8B and a 4B model from scratch, NVIDIA takes its trained Nemotron-4 15B and cuts it down. Structured pruning removes whole units: attention heads, MLP neurons, embedding channels (the model's width) or entire layers (its depth). The question is which to remove and how to recover the lost accuracy cheaply.

Ranking what to cut. Run 1,024 calibration samples through the model, forward passes only, and score each head, neuron and channel by the size of its activations, aggregated across the batch and sequence (L2 over the batch, mean over the sequence worked best). Layers are scored by how much perplexity rises when each is removed, or by how little a layer changes its input.

Choosing a shape. Enumerate architectures that fit the parameter budget, trim the original to each, retrain each for about 1.8B tokens to let rankings settle, and keep the best.

Recovering accuracy. Retrain the chosen model by distillation: minimize the KL divergence between its next-token distribution and the original model's, instead of training on the text's next tokens. Add intermediate-state matching only when many layers were removed. Then prune the 8B again to make the 4B.

The resulting Minitron 8B and 4B used 94B tokens each. The 8B beats the previous-generation Nemotron-3 8B and Llama-2 7B and is close to Mistral 7B, Gemma 7B and Llama-3 8B on most benchmarks; the 4B leads Gemma-2B on most tasks. Both beat other published pruning methods by wide margins. The paper distills its findings into ten best practices, including: prefer width over depth at these sizes, retrain only with distillation, and prune from the model closest to the target size.

THE IDEA, VISUALLY
PRUNE A TRAINED MODEL, THEN DISTILL IT BACK 1 score heads, neurons, channels, layers activations on 1,024 samples, forward only 2 trim to candidate shapes under a budget width preferred; depth by perplexity or BI 3 retrain candidates ~1.8B tokens to rank rankings settle only after a little training 4 distill the winner, ~94B tokens KL on teacher logits; intermediate states if deep cuts 5 repeat from the new model: 15B → 8B → 4B prune the model closest to the target ARCHITECTURES (TABLE 5) hidden heads KV groups MLP Nemotron-4 15B 6144 48 8 24576 Minitron 8B 4096 48 8 16384 Minitron 4B 3072 24 8 9216 all keep 32 layers and 8 KV groups: parameters fall 2-4x, the KV cache per token likely does not (head size unstated) family training cost: 1.8x lower than three from-scratch runs 8B-CLASS BASE MODELS (TABLE 2) tokens MMLU GSM8K HEval Minitron 8B 94B 63.8 51.3 31.6 Llama-3 8B >15T 65.3 50.3 28.1 Mistral 7B 8T 64.1 37.0 28.7 Gemma 7B 6T 64 50 32 Nemotron-3 8B 3.8T 54.7 24.0 20.7 Nemotron-4 15B (parent) 8T 66.6 48.5 35.4 A 4B MODEL AT EQUAL COMPUTE, MMLU (TABLE 11) trained from scratch 24.36 pruned 15B, trained on labels 24.57 pruned 15B, distilled 37.81 pruned 8B, distilled 42.45 axis starts at 20; 25 is chance on MMLU AGAINST OTHER PRUNING METHODS, ~4B (TABLE 4) LLM-Pruner 23.33 LaCo 26.45 Sheared LLaMa 26.4 SliceGPT 28.92 ShortGPT 43.96 Minitron 4B 58.6 MMLU; Minitron also distilled for 94B tokens
Score every head, neuron and channel from a forward pass, cut to the target shape, and let the parent model teach the smaller one back to accuracy. Distillation, not plain retraining, is what made the small model learn.
Research notes: the problem, approach and results
40x

fewer training tokens for Minitron 8B than for Nemotron-3 8B (94B vs 3.8T), with higher MMLU (63.8 vs 54.7)

42.5 vs 24.4

MMLU for a 4B model pruned from 8B and distilled versus trained from scratch with the same compute; 25 is chance

1.8x

lower compute to train the 15B, 8B and 4B family by pruning and distilling instead of three from-scratch runs

THE PROBLEM

Model families are trained one size at a time from scratch, each on trillions of tokens. Teams that need a smaller model for cost or latency face the same bill again, and existing pruning methods lose much of the accuracy.

THE IDEA

Rank a trained model's attention heads, MLP neurons, embedding channels and layers using activations from 1,024 calibration samples, trim to candidate shapes under a parameter budget, briefly retrain candidates to pick one, then retrain the winner by distilling from the original model's logits. Repeat from the smaller model.

THE RESULT

Minitron 8B, retrained on 94B tokens, scores 63.8 on MMLU against 54.7 for Nemotron-3 8B (3.8T tokens) and 65.3 for Llama-3 8B. A 4B pruned from 8B and distilled scored 42.5 on MMLU where a 4B trained from scratch at equal compute scored 24.4. Training the 15B-8B-4B family cost 1.8x less.

02

Why it matters to an FDE

Customers often settle on a model that works and then need a smaller one: for a cheaper GPU, an edge device, or lower latency at high volume. Training a smaller model from scratch is out of reach for almost everyone. Pruning plus distillation from the model they already trust is the practical path, and this paper is the most detailed public recipe for it.

The data cost is small. 94B tokens is under 3% of the original training run, and the retraining data does not need labels: the teacher's own distributions are the target. Distillation, not plain retraining, made the difference: at equal compute, the pruned 4B trained on ordinary next-token labels scored at chance on MMLU (24.6), while the distilled one scored 37.8.

Width cuts keep more than depth cuts. At these sizes, removing heads, neurons and channels beat removing layers once the model was retrained, even though depth pruning looked better immediately after cutting.

Check what the cut actually saves at serving time. All three Nemotron and Minitron models keep 32 layers and 8 key-value groups (Table 5). Parameters drop two to four times, but unless the head size also changed, which the paper does not say, the KV cache per token does not shrink. For long-context serving, memory per session may barely move.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 149 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The ten best practices with their evidence, what the models gave up, and three misreadings

    Free account
  2. 04How it works

    Importance scores per axis, trimming, the architecture search and the distillation losses

    Premium
  3. 05The numbers that matter

    Base-model comparisons, other pruning methods, iso-compute ablations and instruction-tuned results

    Premium
  4. 06Try it yourself

    Recompute the family saving and iso-compute gains, then prune and distill a toy network

    Premium
  5. 07Where it breaks

    Serving memory, weak spots after pruning, parent-dependence, single model family and slips

    Premium
  6. 08Using it on a deployment

    Pruning a customer's model, retraining it by distillation, and checking what was lost

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →