fix(genrm): propagate prompt cohort retry identity - #3861
Conversation
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
|
the synchronous Gym path uses the total batch size as the size of one prompt cohort.
Those rows do not belong to one GenRM comparison. Gym can reject prompt B because its text differs from the prompt already stored for that group. Larger batches can also produce rollout indices outside GenRM's configured cohort size. This helper is used by synchronous GRPO training, GRPO validation, PPO, distillation, and The fix needs to keep two values separate:
this fix should pass the per-prompt generation count into replacing the current |
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
|
/ok to test 492afc5 |
What does this PR do ?
Summary
Propagate stable logical prompt-group identity from NeMo-RL to Gym and GenRM so retries of the same
prompt group can be distinguished from new logical groups.
This is the NeMo-RL side of the corresponding Gym GenRM cohort fix:
Identity model
Each Gym rollout now carries:
_ng_group_id: stable across retries of one logical prompt group._ng_group_attempt: starts at0and increments when the entire group is retried._ng_rollout_index: stable logical sibling index within the group.The Transfer Queue identity remains separate:
group_idremains stable across those attempts.Conceptually:
Changes
Why this is needed
Without stable logical identity, GenRM cannot distinguish:
The combination of group_id, group_attempt, and rollout_index gives GenRM enough information to isolate
replacement cohorts and deduplicate logical sibling slots safely.
Compatibility
A new group_id is generated when callers do not provide one, and the initial group_attempt defaults to 0.
The change does not reuse TQ transaction identities. Existing cleanup and rollback behavior continues to
operate on fresh physical TQ group IDs.
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information