[6/N] Opt-in partial final training step - #1937
Open
Zhichenzzz wants to merge 2 commits into
Open
Conversation
Zhichenzzz
requested review from
Shi-Dong,
fzyzcjy,
guapisolo,
jybsuper,
maocheng23 and
yueming-yuan
as code owners
July 29, 2026 08:51
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Instead of dropping the trailing rollouts that don't fill a whole global_batch_size step, train them as one smaller final step (rollout-side schedule + dynamic batch size only; the static path can't satisfy its fixed-size alignment on an arbitrary remainder). Loss normalization and the LR scheduler already use the true per-step count ([1/N]), so no other machinery changes. Saves up to global_batch_size - 1 rollouts per rollout batch under dynamic sampling/filtering.
Zhichenzzz
force-pushed
the
zhichen/vargbs-partial-step
branch
from
July 29, 2026 18:24
0744c0f to
0bc8a77
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.
Summary
Stacked on #1936. New opt-in flag
--allow-partial-train-step: instead of dropping the trailing rollouts that don't fill a wholeglobal_batch_sizestep, train them as one smaller final step. This is the endgame the series was built for — genuinely variable per-step global batch sizes.dp_sizesamples is skipped with a log line.global_batch_size - 1rollouts per rollout batch under dynamic sampling / filtering — samples are the expensive part of RL.Validation
[2, 2, 1]schedule covering every sample) and the below-dp_size skip guard; default behavior unchanged when the flag is off.--ci-test,--global-batch-size 24 --disable-rollout-trim-samples):All 3 rollout batches trained with uneven
[24, 8]steps — the first genuinely variable global batch size training in miles — job succeeded, CI logprob asserts pass, rewards healthy (0.47-0.59). Without the flag those 8 rollouts per batch (25%) would have been discarded.