Chapter 134 / 5
Direct Alignment: DPO, Rejection Sampling & Distillation
Implement on-policy distillation: sample from the student, score tokens under a (toy) teac
Hard
Implement on-policy distillation: sample from the student, score tokens under a (toy) teacher, and apply the reverse-KL policy-gradient update.
Target interface
class TinyLMComplete the starter code in the editor. Any correct approach is accepted.
Hints0 / 2
Reference solution
Your own code stays in the editor.