Distillation

Training a smaller model to copy the behaviour of a larger one, so it is cheaper and faster to run.

technique

In distillation, a large and capable model acts as the teacher. A smaller model, the student, is trained on the teacher’s outputs, learning to give similar answers to similar inputs.

The student usually ends up much lighter than the teacher, so it responds faster and costs less to run, while keeping a good share of the teacher’s ability on the tasks it was trained for.

Something is usually lost along the way. A distilled model tends to be strongest on the kinds of tasks it was shown during distillation and weaker further from them.

Example

A note-taking app might use a small distilled model on the phone itself to tidy up notes, rather than sending every note to a large model.

Related