Knowledge Distillation

How knowledge distillation transfers the capability of a large language model into a small one — teachers, students, and what makes the transfer work.

Knowledge distillation is how a large model’s capability on one task gets transferred into a model small enough to run on your own hardware. A big model — the teacher — produces outputs on inputs relevant to your task. A small model — the student — is trained to reproduce that behaviour. What you deploy is the student.

The idea predates large language models. Hinton and colleagues introduced it in 2015 for image classifiers, and DistilBERT applied it to language models in 2019. What changed with LLMs is that the teacher no longer has to be trained. Frontier models are available off the shelf, they can generate thousands of labelled examples in minutes, and small models in the 0.3B to 8B range turn out to have enough capacity to absorb task-specific knowledge from a model a hundred times their size.

Why distillation rather than plain fine-tuning

The two are often confused, and they are genuinely related — distillation usually ends in a fine-tuning step. The difference is where the training data comes from.

Fine-tuning assumes you already have a labelled dataset. Distillation assumes you do not, and uses a teacher model to produce one. That matters because the dataset is where most projects stall: teams typically have a handful of examples, not thousands.

Teacher outputs also carry more than a label. A human annotator writes “urgent”. A teacher model demonstrates the reasoning, the output format, and how to handle the awkward cases at the boundary. The student absorbs all of it.

What determines whether it works

Four things, roughly in order of how often they are the problem:

Teacher quality on your specific task. A teacher that is 80% accurate hands its mistakes to the student. Evaluating the teacher before generating any training data is the single highest-value check in the pipeline, and it is cheap.

Data diversity. A teacher asked for a thousand examples will happily produce a thousand near-identical ones. The student then learns a narrow pattern that collapses on real inputs. Effective pipelines vary input length, complexity, phrasing, and topic deliberately.

Validation and filtering. Not everything a teacher generates is usable. Format errors, duplicates, and off-topic outputs need to be caught before they reach the training set.

Task definition. Distillation works best where “correct” is well defined — classification, extraction, question answering, tool calling. Open-ended generation is harder, because there is no clean signal for what the student should be matching.

Where this cluster goes

The articles below cover the mechanics: what teacher and student models actually are, how to choose between them, whether a student can exceed the teacher it learned from (it can, and there is benchmark data on when), and the failure modes worth recognising early.

If you are trying to decide between distillation and something else entirely — retrieval, prompting, or simply a bigger model — the alternatives cluster covers that comparison directly. If you have already decided and want the operational path, start with the training data cluster, which covers the three ways to get a dataset onto the platform.

Can a Small Model Beat Its Teacher?

Yes, on narrow tasks — a 0.6B student beat a 120B teacher by 29 points and a 350M student beat the same teacher on two of three tool-calling benchmarks. The measured figures and why it happens.

Distillation vs Fine-Tuning: What's the Difference?

Knowledge distillation and fine-tuning are related but distinct techniques. Learn how they differ, when to use each, and how combining them produces the best results for production AI.

Distillation vs Quantization: Which Shrinks Your Model Better?

Distillation and quantization both reduce model size, but they work in fundamentally different ways. Learn the trade-offs and when to use each approach — or combine them.

How to Choose a Teacher Model for Distillation

Choose a teacher on measured accuracy for your own task, not parameter count. Criteria table, tool-calling constraints, and the teacher evaluation step that settles it.

How to Distill a Large Language Model into a Small One

A practical guide to distilling large language models into small, deployable models. Learn the end-to-end process — from choosing a teacher to deploying a student that matches its accuracy.

Model Distillation Tutorial: From LLM to Deployable SLM

A hands-on tutorial for distilling a large language model into a small, deployable student model. Covers the full pipeline from teacher selection to production deployment.

Does the Student Need the Same Architecture as the Teacher?

No — text-level distillation transfers behaviour through generated examples, so student and teacher can come from unrelated model families. When architecture does start to matter.

What Is a Student Model in Knowledge Distillation?

The student model is the small model you fine-tune on teacher-generated data and actually deploy. Sizes, how it learns, and what it gives up compared with the teacher.

What Is a Teacher Model in Knowledge Distillation?

A teacher model is the large LLM that generates and validates synthetic training data for a smaller student. Here is what it does, which models qualify, and why you never deploy it.

Knowledge Distillation Explained: Teacher-Student Training for LLMs

Learn how knowledge distillation works — the teacher-student training process that compresses large language models into small, fast, deployable models without losing accuracy.

Knowledge Distillation for LLMs: Compress GPT-4 into a 3B Model

Learn how knowledge distillation lets you compress the capabilities of massive language models like GPT-4 and Llama 70B into small, deployable models with 1B–8B parameters — without sacrificing accuracy on your task.

Teacher-Student Distillation: How It Works and When to Use It

Learn how teacher-student distillation transfers knowledge from a large language model to a small, efficient one. Understand the training process, when it makes sense, and how to get started.

When Does Distillation Fail?

Distillation fails on under-specified tasks, inconsistent labels and open-ended outputs. Ranked causes, the fix for each, and the teacher evaluation step that catches most of them early.