You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AReno currently provides GRPO as a stable policy-only training algorithm. DAPO (Decoupled Clip and Dynamic sAmpling Policy Optimization) extends this family with four coupled techniques intended to improve long-CoT RL training stability and sample utilization:
asymmetric clipping (Clip-Higher);
dynamic sampling that removes prompt groups with no reward variation;
token-level policy-loss aggregation; and
soft overlong reward shaping.
Dynamic sampling trades additional rollout generation for avoiding optimizer updates on all-correct or all-incorrect groups. The proposal would keep this behavior opt-in under an experimental algorithm and would not change the existing GRPO/GSPO objectives.
This is more than an asymmetric-clipping loss change. AReno's current GRPO/GSPO objectives intentionally use a unit-valued differentiable surrogate ratio, while DAPO's Clip-Higher only has a numerical effect when the policy ratio is computed against stored old-policy logprobs. The DAPO implementation would therefore use real rollout old logprobs only inside the experimental dapo loss. This is related to, but deliberately narrower than, #68.
Proposed feature
Add dapo under areno.experimental with the following scope:
register dapo through AlgorithmSpec without changing the stable algorithm list;
compute the token ratio as exp(train_logprob - rollout_old_logprob), with bounded log-ratio values for numerical safety;
implement Clip-Higher with paper defaults clip_eps_low=0.2 and clip_eps_high=0.28;
preserve a response-token mean across packed batches, gradient-accumulation groups, and data-parallel sharding;
generate candidate prompt groups until batch_size qualified groups have been collected or a bounded generation-attempt limit is reached;
decide group eligibility from the unshaped scalar rewards returned by the existing reward function, retaining groups whose rewards are not all equal;
apply the linear overlong penalty only after group eligibility is decided, then compute the usual group-standardized advantages;
keep prompt groups intact when truncating the qualified buffer;
expose bounded, additive DAPO configuration for generation batch size, maximum generation batches, asymmetric clip values, and overlong shaping;
reject agentic rollouts in the first version because dynamic sampling assumes fixed n_samples groups per prompt.
The intended non-agentic data flow is:
candidate prompt groups
-> rollout and base rewards
-> remove constant-reward groups
-> accumulate complete groups to the target batch size
-> apply overlong reward shaping
-> compute group-standardized advantages
-> optimize with real old-policy ratios and token-level aggregation
ordering of base-reward filtering before length shaping.
A bounded end-to-end run would additionally verify finite losses and gradients, parameter updates, dynamic-sampling counters, and ratio/clip diagnostics. This proposal does not intend to claim reproduction of the paper's large-scale AIME result.
Is filtering on AReno's existing scalar reward contract acceptable for the initial implementation, provided overlong shaping is applied after filtering?
Would maintainers prefer one cohesive experimental DAPO PR, or a preliminary internal response-token normalization PR followed by the algorithm PR?
Adding only asymmetric clip values to the existing GRPO loss would be numerically ineffective under the current unit-valued surrogate ratio and would not constitute DAPO.
Splitting Clip-Higher, dynamic sampling, and overlong shaping into independently named DAPO feature PRs would expose an incomplete algorithm surface.
Overlong filtering is intentionally excluded because the maintained reference implementation treats it as overlapping with soft overlong reward shaping.
Motivation
AReno currently provides GRPO as a stable policy-only training algorithm. DAPO (Decoupled Clip and Dynamic sAmpling Policy Optimization) extends this family with four coupled techniques intended to improve long-CoT RL training stability and sample utilization:
Dynamic sampling trades additional rollout generation for avoiding optimizer updates on all-correct or all-incorrect groups. The proposal would keep this behavior opt-in under an experimental algorithm and would not change the existing GRPO/GSPO objectives.
This is more than an asymmetric-clipping loss change. AReno's current GRPO/GSPO objectives intentionally use a unit-valued differentiable surrogate ratio, while DAPO's Clip-Higher only has a numerical effect when the policy ratio is computed against stored old-policy logprobs. The DAPO implementation would therefore use real rollout old logprobs only inside the experimental
dapoloss. This is related to, but deliberately narrower than, #68.Proposed feature
Add
dapounderareno.experimentalwith the following scope:dapothroughAlgorithmSpecwithout changing the stable algorithm list;exp(train_logprob - rollout_old_logprob), with bounded log-ratio values for numerical safety;clip_eps_low=0.2andclip_eps_high=0.28;batch_sizequalified groups have been collected or a bounded generation-attempt limit is reached;n_samplesgroups per prompt.The intended non-agentic data flow is:
Example usage would look like:
Validation plan
The implementation would include deterministic CPU coverage for:
A bounded end-to-end run would additionally verify finite losses and gradients, parameter updates, dynamic-sampling counters, and ratio/clip diagnostics. This proposal does not intend to claim reproduction of the paper's large-scale AIME result.
Questions for maintainers
Reference
Alternatives considered