Implement compute_dr_grpo_objective(log_probs_new, log_probs_old, rewards, epsilon=0.2), the Dr. GRPO (GRPO Done Right) clipped objective.
log_probs_new[i][t] and log_probs_old[i][t] are the new- and old-policy log-probabilities of token t of response i (lengths may differ); rewards[i] =Ri for each of the G responses.
- Advantage: A^i=Ri−G1∑k=1GRk (no std normalization and no 1/∣oi∣ length normalization).
- Token ratio: ρi,t=exp(logπθ(oi,t)−logπθold(oi,t)).
- Objective (a quantity to maximize; return it as is, not negated):
J=G1∑i=1G∑t=1∣oi∣min(ρi,tA^i, clip(ρi,t,1−ϵ,1+ϵ)A^i)
Tokens are summed (not averaged) within each response; the only reduction is the outer 1/G group average. Return a Python float.