Implement DAPO on a toy RLVR task: clip-higher, dynamic sampling (drop all-correct/all-wro

RLHF: Reward Models, PPO & GRPO7 / 7

Chapter 127 / 7

RLHF: Reward Models, PPO & GRPO

Implement DAPO on a toy RLVR task: clip-higher, dynamic sampling (drop all-correct/all-wro

Super-hard

Implement DAPO on a toy RLVR task: clip-higher, dynamic sampling (drop all-correct/all-wrong groups), token-level loss, and overlong reward shaping. [NVIDIA]

Target interface
overlong_shaping(reward, length, soft_cap, hard_cap, penalty=1.0)

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

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