Repository navigation
Add Kimi K3 numerical validation - #4731
Merged
Merged
Conversation
4 of 18 tasks
shuhuayu
force-pushed
the
k3-parity
branch
2 times, most recently
from
October 2, 2026 05:39
a222ab0 to
4ade385
Compare
shuhuayu
force-pushed
the
k3-parity
branch
2 times, most recently
from
October 2, 2026 05:58
0b4d8df to
68d9e9e
Compare
shuhuayu
marked this pull request as ready for review
October 2, 2026 07:42
shuhuayu
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
October 2, 2026 07:42
tianyu-l
approved these changes
Oct 2, 2026
|
|
||
| End-to-end KL divergence against the Hugging Face implementation (multimodal | ||
| inputs): **6.7634e-7**, with **100% top-1 and top-5 match**. | ||
| inputs): **1.0212e-5**, with **100% top-1 and top-5 match**. |
Contributor
There was a problem hiding this comment.
is this caused by recent KDA changes?
Contributor
Author
There was a problem hiding this comment.
i think the main reason is the previous number is ran using fp32 and i updated it with bf16.
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
debugmodeldimensions.kimi_k3_debugmodel_mm_muonB200 integration test as a 10-step loss/gradient-norm regression; this PR adds no new training recipe.main.Why
Kimi K3 had training smoke coverage but no checked-in, architecture-specific loss/gradient-norm trace. This change makes the existing 2-GPU FSDP2/EP2 DistMuon run detect numerical drift through
scripts/loss_compare.pywithout adding another nearly identical test configuration.The one-GPU model-only seed checkpoint uses the existing AdamW
kimi_k3_debugmodel_mmrecipe because DistMuon requires DTensor parameters. The measured 10-step run still useskimi_k3_debugmodel_mm_muon; the seed recipe only initializes the shared model state.The Moonshot comparison remains a manual diagnostic rather than CI. CI drift detection comes from the B200 golden.
Moonshot BF16 parity
The pinned diagnostic was run twice on one GB300 GPU with identical results:
9f62e4e9fffbd0a83ddd60e1c209d828994b35691.192e-070.999987, max difference3.125e-025230/5248match (99.7%)1.0212e-05, cosine0.999968, max difference1.5625e-02100%matchB200 golden
kimi_k3_debugmodel_mm_muonlossandgrad_norm, 10 stepsloss_compare.py358b64b64f4f649b14d943b78e860af79fea028181b108d8eba4bd65745d39d8Validation
tests/unit_tests/cpu/test_integration_test_definitions.py: 17 passed.