Skip to content
Book a conversation

Model distillation

Understand training a student model from a teacher and what to evaluate before replacing the model used for a task.

Luiz GardelinUpdated Read in Markdown
All terms

A conversation about your organization.

Before recommending any tool, we talk with your teams and map how the work really happens.

Arrange a conversation
On this pageIntroduction

Also used as: knowledge distillation, model knowledge distillation.

Model distillation is a training process in which a student model learns to reproduce a teacher model's predictions. Google's glossary describes the case of a smaller student trained to bring its outputs closer to the teacher's. The aim is to retain useful behavior with lower execution requirements. Google, distillation.

Behavioral transfer and its limits

The source explains that training reduces the difference between the models' predictions and notes that student predictions are typically worse than the teacher's. Distillation therefore does not mean copying a capability completely or obtaining identical quality in every situation. The result needs to be measured on the task where the student will be used. Google, training and limitations.

Its relationship to a small language model concerns a possible development process. Small describes relative scale; distillation describes how part of the training was performed. Quantization, in contrast, concerns numerical representation. Keep these concepts separate in delivery documentation.

A hypothetical replacement decision

A team could use a teacher model to produce document classifications and train a student for a bounded list of categories. Before replacing its current model, the team would need to compare teacher and student on documents not used as training examples. The criterion would be correctness against the team's categories, rather than agreement between the two models alone.

Include ordinary cases, infrequent categories, and documents belonging to no category. Define how the student should indicate uncertainty and when a person will classify the document. If the teacher's examples contain an inappropriate classification, evaluation should identify it instead of accepting agreement as sufficient evidence.

During procurement, request a description of the models, examples, and test conditions. Record the resources needed to run the delivered student as well. Replacement depends on preserving the usefulness required by the workflow, rather than merely showing that one model learned to imitate another. Inspect examples where teacher and student disagree as well as those where they agree.

Sources

  1. Machine Learning Glossary: Distillation Google for Developers

    Describes training a smaller student to approximate teacher predictions, with quality limitations.

Written by

Luiz Gardelin

Founder and lead consultant at The Company Brain

Luiz Gardelin is the founder and lead consultant at The Company Brain, an AI organizational transformation consultancy based in Brazil. He also founded Webinhood and Tropk.ai.

See all content by this author

A conversation about your organization.

Before recommending any tool, we talk with your teams and map how the work really happens.

Arrange a conversation

Related terms

Continue reading

All resources