Debug a broken GRPO implementation with wrong grouping, wrong masks, and wrong old-logprob

Research Engineering & Debugging6 / 8

Chapter 256 / 8

Research Engineering & Debugging

Debug a broken GRPO implementation with wrong grouping, wrong masks, and wrong old-logprob

Hard

Debug a broken GRPO implementation with wrong grouping, wrong masks, and wrong old-logprobs.

Target interface
grpo_loss(logits, old_logprobs, actions, group_ids, rewards, completion_mask, eps=0.2)

Implement the function/class skeleton in the editor. Any correct approach is accepted.

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