Support final normalization of streamed Megatron gradients - #2173
Draft
oran-goodman wants to merge 2 commits into
Draft
Support final normalization of streamed Megatron gradients#2173oran-goodman wants to merge 2 commits into
oran-goodman wants to merge 2 commits into
Conversation
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.
streaming_accumulation_v1only for non-colocated Megatron; default requests keep their existing behavior, and unsupported runtimes reject non-default scaling.Testing: 14 CPU tests passed, including Adam parameters/moments and expert buffers; Ruff 0.11.9 and Black 24.10.0 passed. Qwen3.5-4B GPU qualification passed three updates with an interleaved adapter: gradient norms and outputs matched exactly, as did all 55.1M final main parameter entries and both Adam moment arrays with matched request packing. Different packing changes frozen-model numerics.
The Trajectory integration completed 20 steps on both configurations: streamed run 1050962 versus reference 1050942 reduced median step time 16.5% and weight-publication intervals 19.0%, with 9.8% higher accepted action-token throughput (initial step excluded). Both had zero stale-group rejections. This is one stochastic pair, not bitwise full-batch parity. The temporary runtime was shut down and checkpoints preserved.