feat(rl): plumb GRPO flags to the agentic learner - #5107
Open
entrpn wants to merge 1 commit into
Open
Conversation
entrpn
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
huytransformer,
igorts-git,
jiangjy1982,
khatwanimohit,
richjames0,
shralex,
shuningjin,
vipannalla and
xibinliu
as code owners
September 2, 2026 17:27
There was a problem hiding this comment.
Code Review
This pull request adds new configuration fields (use_rollout_logps, force_on_policy_ratio, and log_sampler_trainer_agreement) to the RL BaseModel and propagates them to the GRPO configuration in train_rl.py, along with logging the resolved GRPO configuration. The feedback suggests simplifying the multi-line formatting of the log_sampler_trainer_agreement argument in the GRPO configuration instantiation to a single line.
Comment on lines
+631
to
+633
| log_sampler_trainer_agreement=( | ||
| trainer_config.rl.log_sampler_trainer_agreement | ||
| ) |
There was a problem hiding this comment.
entrpn
force-pushed
the
jfacevedo/rl_force_on_policy_ratio
branch
from
September 2, 2026 17:32
cabacb5 to
f9d09b3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
niting
approved these changes
Sep 3, 2026
andytwigg
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Requires google/tunix#2061 to be merged first.
force_on_policy_ratio, use_rollout_logps, log_sampler_trainer_agreement
and loss_agg_mode were never passed into AgenticGrpoConfig, so setting
them on the command line had no effect and the learner silently used
dataclass defaults.
loss_agg_mode in particular was plumbed for the non-agentic branch only,
so any recent A/B of that flag through the agentic path was measuring the
default rather than the requested value.
Also logs the fully resolved GRPO config at startup, which is how the
above was found.
Tests
Measured on qwen3-4b (OpenMathInstruct-2, agentic rollout):
clipfrac 0.0006 -> 0.0000
log_ratio_abs 0.0157 -> 0.0000
step time 984s -> 742s (~24%)
Gradient magnitude is essentially unchanged; clipping was only firing on
~0.06% of tokens, all of it kernel noise rather than policy drift.
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.