Training Agents 2: Live tutorial on model distillation for training custom agents.

· Source: HuggingFace · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Robotics & Autonomous Systems · Depth: Advanced, quick

Summary

This live session will cover how to transfer capability from a teacher model to a smaller student through distillation. It details supervised fine-tuning on teacher-generated data (off-policy), on-policy and online methods where the teacher scores the student live, and self-distillation where the model teaches itself. The tutorial will explore distillation's four organizing axes: signal, data source, timing, and teacher identity, alongside white-box versus black-box approaches. It also frames distillation as reinforcement learning, utilizing Kullback-Leibler (KD) distance as a dense, token-level reward. All discussed methods are implemented within the TRL framework, part of the Training Agents series.

Key takeaway

For AI Engineers developing custom agents, understanding model distillation is crucial for optimizing performance and resource usage. You should explore off-policy, on-policy, and self-distillation techniques within frameworks like TRL to transfer capabilities from larger models to more efficient student agents. Consider self-distillation when aiming to improve agent performance without relying on external, stronger teachers.

Key insights

Model distillation transfers capabilities from large teacher models to smaller student models using various on-policy, off-policy, and self-distillation techniques.

Principles

Method

Distillation involves supervised fine-tuning on teacher-generated data (off-policy), or on-policy scoring by a teacher in a live loop, or self-distillation where the model teaches itself, all implementable in TRL.

In practice

Topics

Code references

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

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by HuggingFace.