Repository navigation
feat(algorithms): support Reinforce++ baseline whitening on Forest owners - #5519
Open
jinglinglingling wants to merge 1 commit into
Open
jinglinglingling wants to merge 1 commit into
jinglinglingling wants to merge 1 commit into
Conversation
1 task done
jinglinglingling
force-pushed
the
linglinj/pr-b-reinforce-pp-forest
branch
2 times, most recently
from
December 4, 2026 01:43
ad4fc08 to
2945ed2
Compare
Contributor
Author
|
/ok to test 2945ed2 |
…ogical owners Compute the group baseline from one finalized reward per participating owner. Weight global whitening by surviving action tokens, excluding late execution padding. Exercise both Forest penalty scopes through finalization, step padding, and advantage writeback. Signed-off-by: Linglin Jing <[email protected]>
jinglinglingling
force-pushed
the
linglinj/pr-b-reinforce-pp-forest
branch
from
December 4, 2026 09:28
2945ed2 to
9e4eefd
Compare
Contributor
Author
|
/ok to test 9e4eefd |
This branch has not been deployed
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.
What and why
Split out from #4581 per review feedback so the general Forest advantage/loss changes can be reviewed and verified independently.
ReinforcePlusPlusAdvantageEstimatorfor Forest logical owners (logical_advantage.py,advantage_stage.py,config.py)ReinforcePlusPlusAdvantageEstimatorwithminus_baseline=Trueanduse_kl_in_reward=False.LogicalOwnerBatch.action_token_counts(action_mask)and passes the per-owner eligible action-token counts asnormalization_masktoReinforcePlusPlusAdvantageEstimator.compute_advantage, while keepingvalid_mask=owner_participationfor per-prompt baseline estimation and zeroing filtered owners viaowner_batch.valid_mask.ReinforcePlusPlusAdvantageEstimator.requires_global_batchisTrue, the SingleController automatically disables sharding across advantage actors so global whitening runs over the full step batch.validate_forest_estimatorandvalidate_forest_objectiveto allowreinforce_plus_plus(non-PPO) withminus_baseline=True,use_kl_in_reward=False,masked_reward_policy="include",seq-mask-tistoken-level IS correction, andforce_on_policy_ratio=True, while rejecting invalid combinations.seq-mask-tis(nemo_rl/algorithms/loss/loss_functions.py)±inflog ratios to±30.0before computing per-sequence ratios so a non-finite token on one physical row cannot taint other rows in the same batch.tests/unit/single_controller/test_logical_advantage.py,tests/unit/algorithms/test_loss_functions.py)shardable == False(never sharded across advantage actors), covers all 10 objective validation guard rails, and tests per-rowseq-mask-tisfinite-gate isolation.Issues
Split from #4581.
Convergence / perf / functionality proof
rl.nightlycontainer:pytest tests/unit/algorithms/test_advantage_estimator.py tests/unit/algorithms/test_loss_functions.py tests/unit/single_controller/test_logical_advantage.py: 322 passed, 1 skipped.ruff checkandruff format --checkpass on all modified files.Needs upstream changes
None.