esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

What Is Distillation?

What distillation is, how a small model learns from a large one, where it saves money and what to check first, explained simply for your AI interview.

In short

Distillation is when a small AI model is trained to copy the answers of a large model, so it runs cheaper and faster on one job. The large model is the teacher, and the small model that learns from it is the student.

11 min readIntermediateCommon · estimateFacts checked 26 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

Distillation is teaching a small AI model by letting a large one show its answers. The big model is the teacher, the small one is the student. The student learns from the teacher's labels and scores, so it can do the same narrow job faster and with less memory. It is usually not as good as the teacher, so I would measure it on the real task. And I would check the vendor's terms first, because some forbid using their outputs to build competing models.

What is distillation, in plain words?

Distillation is a way to train a small AI model by letting a large one show it the answers. The large model is the teacher. The small model is the student, and it is trained to give the same answers the teacher would give on the same inputs.

Think of a senior claims handler training a new hire. The new hire does not read the whole rulebook. They sit beside the senior, see thousands of decided claims, and learn the pattern. Later they work faster and cost less, but they are only as good as the claims they were shown.

The AI version is the same. An insurer might use a large, costly model to label old claim notes, then train a small model on those labels so it can sort new notes alone.

Key words

Teacher model
The large, capable model whose answers are copied.
Student model
The small model that is trained to copy them.
Soft label
The teacher's score for every option, not only its final pick.
  • “The process of reducing the size of one model (known as the teacher) into a smaller model (known as the student) that emulates the original model's predictions as faithfully as possible.”

    Google Machine Learning Glossary

How does the student learn from the teacher?

The steps are simple. You collect real inputs from your work, let the teacher answer them, and train the student on those pairs. OpenAI's guide describes the same route: "distill the results of a large model to create training data for supervised fine tuning". It adds: "Tune a smaller model (like gpt-4.1-mini) using the dataset you created from the large model."

How a teacher trains a student

Past claim notes

real inputs from your own work

Large teacher model

labels each note and gives reasons

Note and label pairs

the training set for the small model

Small student model

learns to copy the teacher's labels

Cheaper, faster model

same task, lower running cost

  1. 1Real past claim notes go in, the kind of input the small model will face.
  2. 2The big model writes a label for each note, with a short reason.
  3. 3The small model trains on those pairs until it copies the labels.
  4. 4The trained student takes over the routine notes at lower cost.
A large teacher labels past claim notes, and a small student learns from those labels. The student then does the sorting alone, at lower cost. The teacher helps build the student, and the student takes over the routine work.
  1. 1

    Collect real inputs

    Take a few thousand past claim notes. Remove names and bank details first.

  2. 2

    Get the teacher's answers

    Ask the big model to label each note with a short reason. A person checks a sample.

  3. 3

    Train the student

    Fine-tune the small model, which means training it further on your examples, so it learns to copy the labels.

  4. 4

    Test on notes it never saw

    Compare the student with the teacher and a human reviewer, on notes kept out of training.

Why do the teacher's scores teach more?

A plain label only says "water damage". The teacher's scores can also show that wear and tear was a close second and fraud was far off. In plain words, that extra signal tells the student which mistakes are close calls. This needs a teacher whose scores you can read, such as a model you run yourself. A hosted big model often returns only its text answer, so there the training data is just the labels and short reasons.

The idea was written up in 2015. Geoffrey Hinton, Oriol Vinyals and Jeff Dean wrote a paper titled "Distilling the Knowledge in a Neural Network", which builds on work by Caruana and his collaborators. Its abstract says Caruana's team showed that they could "compress the knowledge in an ensemble into a single model which is much easier to deploy". An ensemble is a group of models whose answers are combined, and it is costly to run.

  • Hard label

    One answer

    The note is marked water damage. Nothing is learned about the other options.

  • Soft label

    Every option scored

    Made-up scores: water 0.91, wear and tear 0.06, fraud 0.03. The student sees which mistakes are close.

Hard label or the teacher's scores

Hard label

Water damage

one answer, nothing else

Soft label

Water 0.91, wear 0.06

every option scored, close calls too

Student learns

sees which mistakes are close

Student ready to test

checked on notes it never saw

  1. 1The plain label gives the student one answer to learn from.
  2. 2The teacher's full scores add the close calls.
  3. 3The student is then tested on notes it has not seen.
Both labels come from the same note, and the scores are made up for this example. A hard label gives one answer, while the teacher's scores show how close the other options were.

Where does distillation help, and where does it fall short?

The big win is speed and memory. Google's glossary says a smaller student has "two key benefits": faster inference time, and reduced memory and energy usage. For a claims team sending thousands of notes a day, that usually means a lower bill, since a large hosted model bills per request. The trade-off is quality. As the glossary puts it: "However, the student's predictions are typically not as good as the teacher's predictions."

Google's Gemma 2 report from 2024 says it trained its 2B and 9B models with distillation, "instead of next token prediction". DeepSeek's R1 paper, first submitted in January 2025, open-sourced six smaller models distilled from R1, based on Qwen and Llama.

  • The student copies mistakes too

    If the teacher gets a type of note wrong, the student learns the same wrong label.

  • It is narrow

    A student is strongest on the job it was trained for, and weaker on new kinds of claims.

  • Labelling costs money

    Teacher calls, time and a human check on a sample all come before any saving.

  • Check the terms first

    Anthropic's commercial terms bar using its services to build a competing product, including training competing AI models. OpenAI's business terms bar using its output to develop competing AI models.

  • “to build a competing product or service, including to train competing AI models”

    Anthropic, commercial terms

  • “use Output to develop artificial intelligence models that compete with OpenAI's products and services”

    OpenAI, business terms

How would you decide if distillation is worth it?

I ask three questions. Is the job narrow and repeated? Do I have enough real inputs to learn from? Are the terms allowed? If all three are yes, a student can cut the cost of routine requests. If the job is rare or changing, the big model is the safer choice.

  • Keep the big model

    Full cost, top quality

    Best on rare, odd notes, but every request pays the big model's rate.

  • Routine notes to the student

    Lower cost, fast

    Good on the notes that look alike. Odd ones go back to the big model.

The usual design adds a simple switch in code that decides which model answers. Routine notes go to the student, and anything it is unsure about goes to the big model. That switch is the part to test hardest.

What does the interviewer want to hear?

A strong answer covers

  • A plain definition: a small student learns to copy a large teacher.
  • How the training data is made: the teacher labels real inputs.
  • Why the teacher's scores teach more than one final answer.
  • The trade-off: faster and smaller to run, but usually not as good as the teacher.
  • The terms: check the vendor's rules before using its outputs.

Common traps

  • Trap"Distillation just deletes parts of the model to make it smaller."

    BetterThat describes pruning. Distillation trains a separate small model to copy the big model's answers.

  • Trap"The student will be as good as the teacher."

    BetterUsually it is not as good as the teacher. Measure it on your own task before you switch.

  • Trap"We can copy any model's answers to train ours."

    BetterRead the licence and the terms first. Many vendors forbid building competing models.

Can you spot the right plan?

Spot the plan

A team wants to cut the cost of its claims bot. Which plan is the sound one?

Quick check

What does the student get from the teacher that plain labels do not give?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q294How do you prepare a fine-tuning dataset?11 min
  2. Q299Synthetic data for fine-tuning?10 min
  3. Q300How do you evaluate a fine-tuned model?11 min
  4. Q281Fine-tune vs RAG vs prompting: when to use which?10 min
  5. Q284What is LoRA?10 min
  6. Q282What is full fine-tuning?10 min

Last updated on 26 November 2026

Building an AI model for a team that needs to cut costs?

I design and build AI products and agents, the screens and the system behind them. Book a short call and tell me what your model does and what it costs today.