fix(ci): stabilize GPT-OSS and Mamba checkpoint parity - #3953
Merged
Merged
Conversation
Signed-off-by: Yuhe Zhang <yuhez@nvidia.com>
Signed-off-by: Yuhe Zhang <yuhez@nvidia.com>
6 tasks
Contributor
Author
|
/ok to test 8b0bd42 |
athitten
approved these changes
Sep 21, 2026
athitten
left a comment
Contributor
There was a problem hiding this comment.
LG, thank you @yuhezhang-ai !
This branch was successfully deployed
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.
What does this PR do ?
Stabilize two checkpoint-parity comparisons affected by kernel rounding and MoE expert selection. GPT-OSS 20B PEFT uses the existing 512-token cross-framework prefix gate and ordinary relaxed HF profile. AutoModel/HF parity forwards use a fixed Mamba cumsum head tile, preventing the trained and freshly loaded processes from selecting different numerical kernels.
Changelog
cross_framework_gate_sequence_length: 512only for GPT-OSS 20B PEFT and remove its custom HF mean-KL override. HF returns to the existing relaxed limits: mean KL 0.025, p95 KL 0.1, cosine 0.99. Full 2048-token forwards and diagnostics remain; AutoModel reload retains its standard full-sequence gate.BLOCK_SIZE_H=1cumsum-forward configuration inside the shared parity-forward context. The single-config Triton path bypasses benchmarking and cached choices. Restore the original configuration list on success or failure; preserve training's autotune cache and other kernels.Evidence and validation
Nemotron: all 378 parameter entries and 23 buffer entries match exactly on each of eight ranks after export/reload, including dtypes and layouts. Native mean/p95 KL is 0.00282410 / 0.01047837. The first difference occurs inside the first Mamba mixer, then changes an expert selection in the next MoE layer.
The decisive eight-H100 control holds checkpoint, full 2048-token input, and all other Mamba kernel choices fixed:
This identifies a numerical kernel-selection cause locally. The original failing nightly checkpoint was not retained; the reproduction uses matching Nemotron/harness source, synthetic chat training data, and a compatible staged image. It reproduces drift, not the exact nightly threshold overshoot. The independent GPU control passed. The initial capture run crashed during subsequent inline CPU scoring; separate CPU scoring successfully recovered all retained results.
GPT-OSS: replaying only AutoModel's expert selections in native HF reduced mean KL 0.02154 → 0.00209, retaining HF's own scores/operators. All 603 parameter tensors matched. On the retained adapter, the 512-token prefix of the full forward has mean/p95 KL 0.00836464 / 0.04076376 versus 0.02154484 / 0.07683115 over all 2048 tokens. This supports the scoped gate, not a universal numerical bound.
5ad3e74c5c8ca5b59a4ae942325eb22eaa311040: AutoModel reload bitwise exact; HF prefix mean/p95 KL 0.00849597 / 0.03669290. This predates the Mamba addition.8b0bd420d610f68f5509423b6f2f5e0fbd024348: all three eight-H100 jobs and all 18 checkpoint phases, including source parity, AutoModel reload, HF reload, and native resume. Parent and both child pipelines are terminal and successful.All three AutoModel reloads have zero maximum absolute logit difference over all 2048 tokens. Both Nemotron HF reloads pass the unchanged standard cross-framework limits (mean KL 0.006, p95 KL 0.03, cosine 0.998); GPT-OSS HF uses the ordinary relaxed profile. No numeric threshold overrides or Nemotron sequence reductions were introduced.
Before your PR is "Ready for review"
Additional Information
Original issues:
Follow-up to #3937; retains the FlexAttention parity fix from #3868. No production model implementation or shared threshold profile changes.