A large model can make an AI feature work in a prototype and still be the wrong model to serve every production request. Its latency, inference cost, memory footprint, or deployment requirements may be disproportionate to a narrow task. Model distillation is one way to move the capability you need into a smaller model.
The idea is to train a student model to reproduce useful behavior from a more capable teacher. Research has shown that this can work: Hinton, Vinyals, and Dean's 2015 paper demonstrated knowledge transfer through softened output probabilities, while Sanh and colleagues' 2019 DistilBERT paper reported a smaller language model that retained much of BERT's benchmark performance while running faster. Neither result means that a student inherits everything its teacher can do.
For engineering leaders, the decision is not “Can we make the model smaller?” It is “Can we define the task narrowly enough, and evaluate it well enough, that a smaller model is a better production choice?”
What model distillation means#
In the classic setup, a teacher is a larger or stronger model. A student is a smaller model trained to imitate the teacher's outputs. The student does not copy the teacher's parameters. It learns a mapping from inputs to outputs that approximates the behavior demonstrated by the teacher.
The 2015 approach described by Geoffrey Hinton, Oriol Vinyals, and Jeff Dean uses soft targets. A conventional classifier is often trained against a hard label: the correct class is right, and the alternatives are wrong. But a teacher's output distribution contains more information. It may assign a small probability to several plausible alternatives and almost none to unrelated ones. Those relative probabilities expose some of the teacher's learned similarities between classes.
The researchers softened the teacher's output distribution by raising the softmax temperature. The student was trained to match that distribution, using the same temperature during the transfer stage. When true labels were available, the student could also be trained against them. The temperature is returned to the normal setting for inference. You do not need the equations to understand the principle: the student learns from the teacher's graded preferences, not only from a single final answer.
Modern generative-model workflows often use the word distillation more broadly. A provider may collect prompts, generate synthetic responses from a teacher, and fine-tune a student on those prompt-response pairs. This is a practical form of behavior transfer, but it is not identical to training against the teacher's full probability distribution or internal representations. Keep the method clear when comparing papers and vendor offerings.
What the foundational research actually showed#
Hinton, Vinyals, and Dean — 2015#
“Distilling the Knowledge in a Neural Network” by Geoffrey Hinton, Oriol Vinyals, and Jeff Dean was submitted to arXiv on 9 March 2015 and presented at the NIPS 2014 Deep Learning and Representation Learning Workshop. The paper examined transferring knowledge from cumbersome models—including ensembles—into smaller models that are easier to deploy.
In an MNIST experiment, the authors report that a large, regularized network made 67 test errors. A smaller, unregularized network made 146 errors. When the smaller network was trained to match the large network's soft targets at a temperature of 20, it made 74 test errors. The result shows that soft targets transferred useful information about generalization in that experiment. It does not establish a universal error reduction or a production latency result for modern language models.
The authors also report that distilling an ensemble into a single model significantly improved the acoustic model of a heavily used commercial system. The abstract does not provide a percentage or absolute improvement for that claim, so this article does not assign one. The paper's broader contribution is the demonstration that a compact model can learn useful behavior from a more cumbersome model, not a promise that every student will match every teacher.
Sanh and colleagues — DistilBERT, 2019#
Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf submitted “DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter” on 2 October 2019. Unlike earlier task-specific distillation work, they distilled during pre-training to create a smaller general-purpose language representation model that could then be fine-tuned for downstream tasks.
The paper reports that DistilBERT had 40% fewer parameters than BERT-base and was 60% faster in the authors' CPU inference comparison. On the GLUE development benchmark, it retained 97% of BERT's performance by the paper's aggregate comparison. Those numbers belong to the specific models, training setup, benchmark, and hardware described in the study; they are not a general ratio for distilling arbitrary LLMs.
The paper also reports downstream results: on IMDb sentiment classification, DistilBERT scored 92.82 test accuracy versus 93.46 for BERT-base. On SQuAD 1.1, it scored 77.7 exact match and 85.8 F1, compared with BERT-base's 81.2 and 88.5. A further distillation step during task adaptation improved the reported SQuAD result. The authors also demonstrated on-device computation in a proof-of-concept study.
Together, the papers establish a useful research pattern: a smaller model can preserve a substantial portion of a larger model's task-relevant behavior under a defined training and evaluation setup. They do not establish that distillation preserves broad reasoning, factual coverage, refusal behavior, or robustness across arbitrary prompts.
How teams use distillation today#
The current engineering pattern is to identify a repeated task, collect representative inputs, obtain high-quality teacher responses, and train a smaller model to reproduce the desired output. That task might be classification, extraction, structured response generation, routing, or a bounded assistant workflow. A student can be attractive when the task is frequent, latency-sensitive, and narrow enough to evaluate.
On-device inference is another motivation. DistilBERT's 2019 work demonstrated a compact language model suitable for mobile-device experiments. The broader engineering appeal is that a smaller model may reduce memory and compute requirements and can make local or constrained deployment more feasible. Whether it actually does so depends on the architecture, runtime, quantization, hardware, and workload—not parameter count alone.
Vendor workflows make the pattern more accessible. Amazon Bedrock's documentation, consulted 3 November 2026, describes a workflow in which a developer selects a teacher and compatible student, supplies prompts or invocation logs, generates synthetic teacher responses, and fine-tunes the student. AWS documents training and validation data handling and supported teacher-student combinations; these are product-specific constraints, not universal requirements for all distillation methods. Its documentation also states that the resulting distilled model is accessible to the customer and that Bedrock does not use the customer's data to train other public teacher or student models.
An OpenAI Cookbook recipe published 16 October 2024 illustrates a different provider-specific workflow: it uses stored gpt-4o completions to fine-tune gpt-4o-mini for wine-variety classification. The recipe reports 79.33% accuracy for the fine-tuned student on its 300-example validation subset, compared with 79.67% for gpt-4o and 64.67% for the unmodified gpt-4o-mini. The recipe is explicitly archived and may reference outdated models or APIs. Treat those results as the reported outcome of that cookbook's dataset and procedure, not as a current model comparison or a transferable performance guarantee.
As of 3 November 2026, OpenAI's current supervised fine-tuning documentation says its fine-tuning platform is winding down and is no longer accessible to new users. Treat the cookbook as a historical technical example, not a currently available path for a new account.
What a smaller student may lose#
Distillation is an approximation. The student has less capacity, and the training data covers only some of the teacher's behavior. If the production task drifts beyond that coverage, the student may fail in ways the larger teacher would not.
The main risks are:
- Breadth: a student trained for one workflow may not retain the teacher's ability to handle unrelated requests, long-tail questions, or unfamiliar combinations of tasks.
- Robustness: performance on familiar examples does not prove performance on unusual inputs, adversarial prompts, multilingual cases, malformed data, or distribution shifts.
- Safety behavior: if the training set does not include relevant refusal, privacy, security, and escalation cases—and the evaluation does not test them—the student may imitate incomplete or unsafe behavior. Do not assume that a teacher's safety properties automatically transfer.
- Calibration and uncertainty: a student may produce confident-looking answers where the teacher would express uncertainty or choose a different response. Measure abstention and escalation behavior if those are part of the product contract.
- Maintenance burden: changes to prompts, tools, policies, source data, or product requirements can make the student stale. A teacher update does not automatically update the student.
The practical implication is to define a supported task boundary. A distilled model should not silently become the fallback for every request simply because it is cheaper.
Practical considerations before you distill#
Build the dataset around real use#
Start with representative production or historical inputs where permitted, then add edge cases and difficult examples. Include the range of user intent, input quality, languages, formats, and failure conditions the model will encounter. Teacher-generated answers are not automatically correct: review them against ground truth, policy, and domain requirements. Keep a held-out evaluation set that is not used to train the student.
If the system uses retrieval or tools, capture the context and tool state that materially affect the answer. Otherwise, you may train the student on responses that depended on information it will not receive at inference time. Remove or protect personal and confidential data according to your data-handling requirements.
Evaluate task quality, not resemblance alone#
A student can imitate the teacher's style and still be wrong. Evaluate against the product's actual success criteria: correctness, groundedness, structured-output validity, tool-call accuracy, refusal quality, escalation, latency, throughput, memory, and cost per successful task. Compare the student with both the teacher and a small model used without distillation. Test representative, edge, and adversarial cases, and monitor production drift after release.
Separate offline evaluation from online monitoring. Use staged rollout and a fallback path where the risk warrants it. Define unacceptable regressions before training; otherwise, teams can rationalize a cheaper model that quietly degrades the user experience.
Check rights, terms, and data governance#
Before using a teacher's outputs for training, review the applicable provider terms, model license, API agreement, and any restrictions on output use, model training, derivative models, or competitive use. Terms can differ between hosted APIs and open-weight models, and can change. Also review customer-data permissions, retention, residency, access controls, and whether prompts or logs may contain regulated or confidential information. A technical ability to export responses does not itself establish permission to train on them. Get legal or procurement review when the contract or license is unclear.
Plan for model lifecycle ownership#
Record the teacher and student versions, prompt template, dataset provenance, filtering rules, training configuration, evaluation results, and known limitations. Keep the training and evaluation pipeline reproducible. Re-run the eval suite when the teacher, student, prompt, retrieval system, tools, or policy changes. Assign an owner for refreshing, rolling back, or retiring the student model.
Distill, fine-tune, prompt, or keep the large model?#
These approaches overlap, but they solve different problems. Distillation describes where the student supervision comes from; fine-tuning describes adapting model weights using examples or an objective. A distillation workflow commonly uses fine-tuning to train the student.
| Option | Choose it when | Main trade-off |
|---|---|---|
| Prompt a small model | The task is simple and the base model already performs adequately with better instructions, examples, or output constraints | Lowest training complexity; may not close a persistent capability gap |
| Fine-tune a small model | You have trusted examples of desired behavior and need more consistent task performance or format | Requires data, training, and evaluation; does not automatically transfer a stronger teacher's capabilities |
| Distill into a small model | A stronger teacher performs well on a narrow, repeated task, and you can legally use its outputs to train and evaluate a student | Can transfer task-specific behavior, but quality is bounded by data coverage, student capacity, and evaluation scope |
| Keep the large model | The workload is broad, ambiguous, high-stakes, changing quickly, or depends on capabilities the student cannot reliably reproduce | Higher serving cost or latency may be justified by broader capability and fewer task-specific constraints |
A sensible sequence is to measure the current system, optimize the prompt and surrounding workflow, test a capable small model, and only then consider training. Distill when you have evidence that the teacher solves a clearly bounded task and the smaller student can meet the same acceptance criteria at a better operational cost. Keep a route to the teacher for uncertain or out-of-scope requests if the product needs it.
What to do next#
Distillation is not a shortcut around model evaluation. It moves some of the teacher's demonstrated behavior into a cheaper deployment target, and that transfer must be tested against the work your product actually performs. Before choosing a student, map the task, data, evaluation, safety requirements, serving constraints, and operational ownership.
Use the ML System Design Checklist to review the broader system decisions around data, evaluation, deployment, monitoring, and reliability.
References#
- Distilling the Knowledge in a Neural Network — Geoffrey Hinton, Oriol Vinyals, and Jeff Dean (2015)
- DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter — Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf (2019)
- Customize a model with distillation in Amazon Bedrock — AWS documentation, consulted 3 November 2026
- Prerequisites for model distillation — Amazon Bedrock documentation, consulted 3 November 2026
- Leveraging model distillation to fine-tune a model — OpenAI Cookbook, 16 October 2024; archived
- Supervised fine-tuning — OpenAI API documentation, consulted 3 November 2026



