Model Distillation 2026: How to Train Small Models From Big Ones, With Real Tools
A 70B teacher produces a 7B student that keeps most of the quality - that is distillation, and it is how companies ship cheap models. How does it actually work with open tools?
💡 What You Will Learn
A 70B teacher produces a 7B student that keeps most of the quality - that is distillation, and it is how companies ship cheap models. How does it actually work with open tools?
📜 Table of Contents
The Distillation Idea in One Sentence
Train a small student model to imitate a large teacher model, using the teacher's outputs (including its confidence distribution) as training signal. The student learns the teacher's reasoning shortcuts without the teacher's size.
Why It Matters in 2026
Distillation is the economics layer of AI: DeepSeek distilled R1's reasoning into 1.5B-70B variants that run on commodity hardware, and every major lab ships distilled models alongside flagships. For a team, a distilled 7B beats a raw 7B trained from scratch on most tasks - and costs a fraction of running the 70B.
Two Flavors
- Offline (static) distillation - run the teacher once on a dataset, save its outputs (logits or answers), train the student offline. Simple, one-time teacher cost.
- Online distillation - the teacher scores the student during training (e.g. via preference feedback or reward). Better alignment, more expensive.
The Practical Open-Source Stack
| Layer | Tool |
|---|---|
| Generate teacher outputs | any strong model via API, or DeepSeek-R1 (91,976 stars) locally |
| Dataset processing | huggingface/datasets (21,828 stars) |
| Train student | transformers (163,377 stars) + TRL (19,040 stars) |
| Efficient training | Unsloth (69,832 stars) or PEFT (21,522 stars) |
| Evaluate | your eval set, side-by-side vs teacher |
The Standard Recipe
- Take 10k-100k high-quality prompts.
- Run the teacher, collect answers (with reasoning traces if the teacher shows them).
- Filter: keep only outputs that pass a quality check (an LLM judge or rules).
- Train the student with SFT on those (prompt, answer) pairs.
- Evaluate the student against the teacher on a held-out set; iterate.
The Failure Modes
- Imitation of garbage - if the teacher outputs are unfiltered, the student learns the teacher's errors. Filtering is the highest-leverage step.
- Wrong student size - a 1B student cannot absorb a 70B teacher's reasoning; match capacity to task complexity.
- Benchmark chasing - distilling toward a leaderboard instead of your use case produces a model that is great at the benchmark and wrong at your job.
The Honest Expectation
A well-distilled student typically keeps 85-95% of the teacher's quality on the target task at 5-20x less inference cost. That trade is why distillation is the standard 2026 move for shipping models at scale.
