Model distillation is a model training/fine-tuning process where a smaller student model is trained from a teacher model. The evolution of distillation goes from model compression to knowledge/behaviour transfer to transfer of reasoning abilities. The student could have better generalization depending on how the distillation was done. So you end up with a smaller, faster, cheaper model with better generalization while needing fewer training samples during training and you can use a higher learning rate.

The student model trained on the hard labels has low quality. The student model fine-tuned on the original training data is better but not as good as the distilled student.

The reason for the student being smaller and faster and cheaper is obvious. We choose a smaller model for the distillation process.

The intuition for why distillation works is interesting. Learning a complex mapping based on a redundant, large dataset is hard. It has high variance and needs a small learning rate and also a lot of gradient updates. But transferring a known mapping is easy.

The reason for why the student ends up better generalization is interesting too. If you transfer only the soft label probabilities, the student learns not only the correct answer but also all the important wrong answers and how wrong they are relative to the correct answer as well as relative to other wrong answers.

The reason for the higher sample efficiency is because each training example provides multiple bits of information in the gradient, not just the gradient to ensure the right answer. This also makes the training have lower variance for the gradients.

The evolution of ideas is as follows.

  • 2006: model compression. Basically the hard labels are used to transfer knowledge to a smaller model.
  • 2015: knowledge distillation from Hinton et al. The soft labels are used to transfer knowledge to a smaller model. The softer labels are generated by dividing the logits with a temperature factor (2-20) during training. This flattens the probability distribution which emerges post-softmax.
  • 2019: DistilBERT used distillation during pre-training too and made distilled models very popular. Later there were attempts to transfer attention values, activations, etc too.
  • 2023: Alpaca, Vicuna, LlaMA-GPT-4 – all of them attempted to transfer the instruction following abilities from OpenAI closed models to small open models using a small number of examples.
  • 2023: Open LLMs became teachers. CoT transfer, reasoning transfer followed culminating in Generalized Knowledge Distillation (GKD) which is an on-policy method which generates sequences using the student model, gets the teacher model to score each token and then the student is trained on it.
  • 2025: DeepSeek-R1 generated strong reasoning traces which were used to SFT small student models.

References