-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[main] feat(moe): Support gated delta net for Qwen3-Next (1/4) #1989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
What tests have been done to validate the implementation of the gated delta net is correct? |
9c74ec3 to
4fcc94b
Compare
99d022e to
1a63170
Compare
|
Hi @jaredcasper , I have rebased main and make the following changes to this MR,
Thanks. cc @yanring |
Hi @jaredcasper , we have do several things to validate the implementation.
In the next few weeks, we will further add a functional test to guarantee the long-term correctness of Qwen3-Next. |
065a890 to
c355b9a
Compare
In the meantime do you think it makes sense to split this up and get the other features in? |
Do you mean covering multiple features in a single functional test? It will be excellent, as long as we do not have too many features in one test case making it hard to maintain. |
|
Hi @jaredcasper , I remember you mentioned that you need a thorough review to the |
No, I mean there are 7 changes listed in the PR, do they all need to be in one PR? I'm saying while some of the features are getting tests added for them does it make sense to open PRs for some of the others that have been tested. |
I thought you were going to work on it a bit after our conversation, but if you are done refining I've asked some from my team to do a thorough review. |
e5ba8dc to
2b90698
Compare
|
/ok to test 2b90698 |
2b90698 to
218f562
Compare
|
/ok to test 218f562 |
82b278e to
5439b64
Compare
5439b64 to
7b25c4f
Compare
| dtype=self.config.params_dtype, | ||
| device=torch.cuda.current_device(), | ||
| ).uniform_(*self.A_init_range) | ||
| self.A_log.data.copy_(A) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: A_log should store log(A), not A directly.
Current code stores raw A values, but forward() calls self.A_log.exp() assuming A_log contains log-space values.
Fix: self.A_log.data.copy_(torch.log(A))
What does this PR do ?
MR to dev.
Design doc
Qwen3-Next functionality PRs.
Changes in this PR:
New supported arguments for Qwen3-Next
New for Qwen3-Next, but already supported in MCore yet
LM loss curve with the training dataset of Qwen3 are as below (GBS=256, seq_len=4096, TP1 is in green, TP2 is in blue).
wandb url
Contribution process
flowchart LR A[Pre-checks] --> B[PR Tests] subgraph Code Review/Approval C1[Expert Review] --> C2[Final Review] end B --> C1 C2 --> D[Merge]Pre-checks
Core 0.8)Code review
The following process is enforced via the CODEOWNERS file for changes into
megatron/core. For changes outside ofmegatron/core, it is up to the PR author whether or not to tag the Final Reviewer team.For MRs into `main` branch
(Step 1): Add PR label
Expert Review(Step 2): Collect the expert reviewers reviews
Expert Reviewlabel when your PR is ready for review.Final Review might get declined if these requirements are not fulfilled.
(Step 3): Final Review
Final Reviewlabel(Optional Step 4): Cherry-pick into release branch
If this PR also needs to be merged into
core_r*release branches, after this PR has been merged, selectCherry-pickto open a new PR into the release branch.For MRs into `dev` branch
The proposed review process for `dev` branch is under active discussion.MRs are mergable after one approval by either
[email protected]or[email protected].Merging your PR
Any member of core-adlr and
core-nemowill be able to merge your PR.