How Small Models Learn to Think Like Giants

· Source: Jia-Bin Huang · Field: Technology & Digital — Artificial Intelligence & Machine Learning · Depth: Advanced, long

Summary

Knowledge distillation transfers capabilities from large "teacher" models to smaller "student" models, making them faster and more affordable. Initially, this involved token-level distillation using "dark knowledge" from teacher probability distributions, softened by temperature, and minimizing KL divergence. However, limitations like exposure bias in sequence-level distillation, where students train on teacher trajectories but infer on their own, led to compounding errors. Reinforcement learning addresses this by training on student trajectories but suffers from sparse reward signals. On-policy distillation combines the strengths, allowing student models to generate their own trajectories while receiving dense, token-level feedback from a teacher. This approach, demonstrated with models like Qwen 38B and T5 XL, significantly improves performance, compute efficiency (9-30x less estimated compute), and addresses challenges like catastrophic forgetting in personalization and effective data reuse. On-Policy Self-Distillation (OPSD) further refines this by enabling a single model to act as both teacher and student using privileged context.

Key takeaway

For Machine Learning Engineers developing efficient or specialized LLMs, on-policy distillation offers a powerful solution to improve smaller models. You should consider implementing this approach to train on your model's own generated trajectories, leveraging dense, token-level feedback from a teacher or even through self-distillation. This method significantly boosts performance, reduces compute costs by 9 to 30 times compared to supervised fine-tuning, and effectively addresses challenges like catastrophic forgetting and data reuse in personalization tasks.

Key insights

Knowledge distillation effectively transfers capabilities from large teacher models to smaller student models, enhancing efficiency and performance.

Principles

Method

On-policy distillation involves a student model generating its own trajectories, with a powerful teacher assigning dense, token-level feedback on the student's actual outputs. This allows training on partial rollouts and uses a single teacher forward pass.

In practice

Topics

Best for: AI Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, NLP Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Jia-Bin Huang.