fix: is_offload_optimizer_states_in_train_step not passed to batch.meta_info in RLVR and agentic pipelines - #478
Open
sanmuf wants to merge 1 commit into
Open
Conversation
…n RLVR and agentic pipelines
sanmuf
force-pushed
the
fix/offload-optimizer-states-passing
branch
from
August 4, 2026 05:43
d971866 to
607b491
Compare
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
is_offload_optimizer_states_in_train_stepcontrols whether optimizer states are offloaded to CPU after each train step (saving GPU memory at the cost of CPU-GPU transfer overhead). This field is defined inbase_config.pywith defaultFalse, and should be passed from each pipeline's config tobatch.meta_infoso thatMegatronTrainStrategy.train_stepcan read it.However, in the RLVR and agentic pipelines, this field was missing from
batch.meta_infoduring training. As a result,MegatronTrainStrategy.train_stepfalls back to its hardcoded defaultTrue, rendering the user's yaml configuration ineffective.Changes
is_offload_optimizer_states_in_train_stepto training batch'smeta_info, reading fromself.pipeline_configImpact
Users can now control
is_offload_optimizer_states_in_train_stepvia yaml configuration in RLVR and agentic training workflows. Previously, the setting was silently ignored.