Repository navigation
feat: add rubric mean and fixed baseline comparison for RLHF - #4346
Conversation
Signed-off-by: Julien Veron Vialard <[email protected]>
Signed-off-by: Julien Veron Vialard <[email protected]>
Signed-off-by: Julien Veron Vialard <[email protected]>
Signed-off-by: Julien Veron Vialard <[email protected]>
Signed-off-by: Julien Veron Vialard <[email protected]>
Signed-off-by: Julien Veron Vialard <[email protected]>
Signed-off-by: Julien Veron Vialard <[email protected]>
Signed-off-by: Julien Veron Vialard <[email protected]>
Signed-off-by: Julien Veron Vialard <[email protected]>
| "genrm_max_output_tokens_hit_rate_per_group", | ||
| ) | ||
|
|
||
| group_reward_metrics = _group_reward_diagnostics(results, reward_group_size) |
There was a problem hiding this comment.
Non-blocking follow-up for the main port: could we compute these diagnostics after apply_group_length_penalties?
With grpo.length_penalty enabled, I reproduced rewards [1, 1] becoming [1.05, 0.95], while zero_advantage_group_pct remained 100 and total_reward/std_in_group remained 0. The expected values for the final rewards are 0% and approximately 0.07071.
Training uses the correctly shaped rewards; only these diagnostics are computed too early.
| ), | ||
| default=0, | ||
| ), | ||
| "reasoning_tokens": r["reasoning_token_count"], |
There was a problem hiding this comment.
Non-blocking test follow-up for the main port: please update the remaining mock rollout results with reasoning_token_count, response_token_count, and token_extraction_valid.
These three existing tests fail with KeyError: reasoning_token_count at this access:
tests/unit/experience/test_rollouts.py::test_postprocess_nemo_gym_group_reports_per_agent_live_metricstests/unit/experience/test_reward_penalties.py::TestMaskEnvFlaggedSamplesBatchedGate::test_gate_on_carries_mask_sampletests/unit/experience/test_reward_penalties.py::TestMaskEnvFlaggedSamplesBatchedGate::test_gate_off_omits_mask_sample
All three passed when rerun against the base postprocessing function. The focused CPU test run bypassed unrelated Ray-startup fixtures.
Real NemoGym postprocessing always supplies these fields, so this is a stale-fixture regression, not a demonstrated production crash; updating the fixtures should be sufficient.
Point Gym to e24db4e6 after merging NVIDIA-NeMo/Gym#3775. Its tree is identical to the previously pinned 81bbfcbd; no runtime or dependency changes. Signed-off-by: Yi-Fu Wu <[email protected]>
yfw
left a comment
There was a problem hiding this comment.
approved for super-v3.5-posttraining. Left a few comments we should address when merging to main
What does this PR do ?
Adds support for rubric mean and fixed baseline comparison for RLHF. Logs rubric/overall rewards, reasoning and response token counts, reward ties and variance, parse failures, and GenRM token usage.
Issues
N/A
Usage
Each dataset row must provide the baseline and expected rubric IDs.
Before your PR is "Ready for review"
Pre checks:
Additional Information
Depends on NVIDIA-NeMo/Gym#3775