Repository navigation
Conversation
xs1997zju
added this pull request to stack #2112
October 8, 2026 12:57
xs1997zju
marked this pull request as ready for review
October 8, 2026 12:58
This was referenced Oct 8, 2026
Collaborator
Author
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬
Stack #2112 (bottom to top):
The existing
TestGlm53TextMoEAccuracy.test_fsdp_accuracycompares native HF and XTuner forward loss on the reduced GLM-5.3 checkpoint. Retain that test and its loss assertion, and additionally compare full-vocabulary logits at the final eight next-token positions for each existing text sample.The test still uses the same checkpoint, sentences and EP1/4/8 parameterization. Capture HF logits during its existing forward; request XT logits with
loss_ctx=Nonein an additional no-grad forward so the public training-loss path remains covered. Both models run in eval mode. There is no backward or parameter update.The small metric helper checks shape/finiteness and computes relative L2, cosine and maximum absolute error with CPU FP64 reductions. Each sample must satisfy relative L2 <5% and cosine >0.998, independently of the unchanged loss-curve thresholds. Six CPU checks cover identity, shape/nonfinite failures, position permutations, and a common logits offset that leaves CE unchanged but must fail the logits check.
Validation:
This PR contains only the existing text test change, the metric helper and its regression tests. The separate multimodal replay/data-preparation scripts and documentation are excluded. No model implementation, preprocessing or training recipe is changed. Base is #2111; the vision RoPE fix is already in the underlying stack.