Tinker Small models: distillation & routing

by Samy (Kondasamy Jayaraman)

... ...

The teacher at the back, the student in front, the chute between them.

Chapter 2 of 7

Learning from a teacher

The student was not trained from scratch: it learnt from Larkspur mini, copying how the bigger model spreads its bets.

This chapter: How does a small model learn from a big one, and what does it learn that text alone doesn’t teach?

About this chapter

You will learn

  • The difference between the right answer and the teacher’s odds
  • What a training run of distillation looks like, step by step
  • Why the student ends a little behind the teacher, not far behind

Words you’ll meet

Distillation
Hinton, Vinyals and Dean (2015) train a small model on the odds a large model gives each answer, used as “soft targets”, raising the large model’s temperature until those odds are spread out enough.
Teacher and student
The big model whose odds are copied, and the small model that learns to copy them.
Soft targets
The teacher’s whole set of odds over the next piece, used as the lesson instead of the one right piece.
Temperature
A setting that spreads a model’s odds out: above 1, the unlikely pieces get a bigger share.
Loss
How surprised a model is by the next piece of text, on average. Training lowers it.
Held-out text
Text kept out of training, used only to score the models.

Step 1 of 4

Text alone teaches one right piece at a time. teaches the teacher’s whole set of odds instead.

Open one lesson.

Loading Larkspur mini