DeepSeek V4 Muon supprt#4065
Open
snehalv2002 wants to merge 1 commit into
Open
Conversation
Contributor
|
This PR has been automatically marked as stale because it has not had recent activity. It will be closed soon if no further activity occurs. Thank you for your contributions. |
snehalv2002
force-pushed
the
snehalv-dsv4-muon
branch
from
July 9, 2026 21:51
1022744 to
6e7ae54
Compare
snehalv2002
marked this pull request as ready for review
July 16, 2026 00:28
snehalv2002
requested review from
A9isha,
NicoGrande,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
igorts-git,
jiangjy1982,
khatwanimohit,
richjames0,
shralex,
suexu1025,
vipannalla and
xibinliu
as code owners
July 16, 2026 00:28
snehalv2002
force-pushed
the
dsv4-bug-fixes
branch
from
July 16, 2026 22:02
1395bae to
67c79bb
Compare
snehalv2002
force-pushed
the
dsv4-bug-fixes
branch
from
July 16, 2026 23:01
939df7e to
3f124b5
Compare
snehalv2002
force-pushed
the
snehalv-dsv4-muon
branch
from
July 16, 2026 23:02
0b3bd20 to
4b95344
Compare
snehalv2002
force-pushed
the
dsv4-bug-fixes
branch
from
July 16, 2026 23:05
3f124b5 to
eb3781f
Compare
snehalv2002
force-pushed
the
snehalv-dsv4-muon
branch
2 times, most recently
from
July 16, 2026 23:05
9b98b4c to
a3f7c25
Compare
snehalv2002
force-pushed
the
dsv4-bug-fixes
branch
from
July 16, 2026 23:12
eb3781f to
0d18a3e
Compare
snehalv2002
force-pushed
the
snehalv-dsv4-muon
branch
from
July 16, 2026 23:12
a3f7c25 to
50cdfec
Compare
snehalv2002
force-pushed
the
dsv4-bug-fixes
branch
from
July 16, 2026 23:15
0d18a3e to
7f4b99f
Compare
snehalv2002
force-pushed
the
snehalv-dsv4-muon
branch
from
July 16, 2026 23:15
50cdfec to
90d2625
Compare
snehalv2002
force-pushed
the
dsv4-bug-fixes
branch
from
July 16, 2026 23:15
7f4b99f to
aee748b
Compare
snehalv2002
force-pushed
the
snehalv-dsv4-muon
branch
from
July 16, 2026 23:15
90d2625 to
a969739
Compare
snehalv2002
force-pushed
the
dsv4-bug-fixes
branch
from
July 17, 2026 23:43
aee748b to
2d1c867
Compare
snehalv2002
force-pushed
the
snehalv-dsv4-muon
branch
from
July 18, 2026 20:08
a969739 to
7a78e76
Compare
Contributor
|
🤖 Hi @shuningjin, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
Contributor
|
🤖 I'm sorry @shuningjin, but I was unable to process your request. Please see the logs for more details. |
Contributor
|
🤖 Hi @shuningjin, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
shuningjin
reviewed
Jul 21, 2026
Collaborator
There was a problem hiding this comment.
Greak work! Thanks for incorporating hybrid Newton Schultz iterations and adding parameter transformation for DeepSeek4!
The mapping looks reasonable. Only minor comments.
snehalv2002
force-pushed
the
snehalv-dsv4-muon
branch
from
July 22, 2026 17:57
7a78e76 to
3256a7a
Compare
snehalv2002
force-pushed
the
snehalv-dsv4-muon
branch
from
July 22, 2026 22:09
3256a7a to
307ebb3
Compare
aireenmei
approved these changes
Jul 22, 2026
snehalv2002
force-pushed
the
snehalv-dsv4-muon
branch
from
July 23, 2026 16:42
307ebb3 to
0e574ad
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.
Description
Add support for Muon optimizer for DeepSeek V4. This was the parameter mapping for parameter -> Muon/AdamW used, following quote from the paper: "We maintain the AdamW (Loshchilov and Hutter, 2017) optimizer for the embedding module, the prediction head module, the static biases and gating factors of mHC modules, and the weights of all RMSNorm modules. All other modules are updated with Muon."
Tests
Can see the the perplexity/lm_loss decreasing in this run using this train command where we train with Muon.
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.