fix(grpo_sync): skip refit for colocated MegatronGeneration - #2967
Merged
Conversation
Contributor
Author
|
/ok to test 5e33776 |
In grpo_train_sync, NEED_REFIT was unconditionally True for any non-None policy_generation, so colocated MegatronGeneration ran refit_policy_generation which dispatched to the IPC ZMQ path. MegatronGeneration only overrides update_weights_from_collective, so the colocated IPC ZMQ branch raised NotImplementedError. Mirror the legacy grpo.py:1983-1986 guard so the two trainers behave identically for this case. Signed-off-by: Zhiyu Li <zhiyul@NVIDIA.com>
ZhiyuLi-Nvidia
force-pushed
the
fix/grpo-sync-megatron-refit
branch
from
June 30, 2026 05:26
5e33776 to
439b585
Compare
Contributor
Author
|
/ok to test 439b585 |
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.
closes #2942.
Summary
grpo_train_sync,NEED_REFITwas unconditionallyTruefor any non-Nonepolicy_generation, so colocatedMegatronGenerationranrefit_policy_generation, which dispatches to the IPC ZMQ path.MegatronGenerationonly overridesupdate_weights_from_collective, so the colocated IPC ZMQ branch raisedNotImplementedError.grpo.py:2155-2158guard so the sync and legacy trainers behave identically for this case.Test plan
vlm_grpowithpolicy_generation=MegatronGenerationandcolocated.enabled=trueongrpo_train_syncand confirm it no longer raisesNotImplementedErrorduring refit.grpo.py).🤖 Generated with Claude Code