Implement an end-to-end toy RLHF loop on a “bandit-LM”: train an RM from synthetic prefe

RLHF: Reward Models, PPO & GRPO6 / 7

Chapter 126 / 7

RLHF: Reward Models, PPO & GRPO

Implement an end-to-end toy RLHF loop on a “bandit-LM”: train an RM from synthetic prefe

Super-hard

Implement an end-to-end toy RLHF loop on a “bandit-LM”: train an RM from synthetic preferences, optimize the policy with PPO + KL control, and plot gold vs proxy reward to exhibit over-optimization. [OpenAI]

Target interface
softmax(z)

Complete the starter code in the editor. Any correct approach is accepted.

Hints0 / 2
Reference solution
Your own code stays in the editor.