Repository navigation
Fix DeepGEMM Mega MoE under expert parallelism - #49428
Merged
Merged
Conversation
Since DeepSeek-V4 declares `ep_dispatch_experts`, the Mega MoE override left that rule in place: token dispatch wrapped the Mega MoE experts and called them without a process group, so `tp_size=ep_size` runs raised on the first forward. The older `ep_router` + `moe_tp_experts` plan was never applied either, since the override renamed both styles and the mixin matched neither. Mega MoE dispatches inside its kernel, so it takes over the experts rule (`ep_dispatch_experts` -> `megamoe_experts`), runs on the TP group like masked EP, and requires `ep_size == tp_size`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
IlyasMoutawwakil
marked this pull request as ready for review
October 8, 2026 13:03
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
vasqu
requested review from
3outeille and
ArthurZucker
and removed request for
Rocketknight1 and
ydshieh
October 8, 2026 13:45
3outeille
approved these changes
Oct 16, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 16, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 16, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 16, 2026
IlyasMoutawwakil
enabled auto-merge
October 16, 2026 07:55
3 of 5 tasks
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: finegrained_fp8 |
Contributor
CI recapDashboard: View test results in Grafana |
vasqu
disabled auto-merge
October 16, 2026 11:27
vasqu
added a commit
that referenced
this pull request
Oct 16, 2026
Since DeepSeek-V4 declares `ep_dispatch_experts`, the Mega MoE override left that rule in place: token dispatch wrapped the Mega MoE experts and called them without a process group, so `tp_size=ep_size` runs raised on the first forward. The older `ep_router` + `moe_tp_experts` plan was never applied either, since the override renamed both styles and the mixin matched neither. Mega MoE dispatches inside its kernel, so it takes over the experts rule (`ep_dispatch_experts` -> `megamoe_experts`), runs on the TP group like masked EP, and requires `ep_size == tp_size`. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
6 tasks
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.
Since DeepSeek-V4 declares
ep_dispatch_experts, the Mega MoE override left that rule in place: token dispatch wrapped the Mega MoE experts and called them without a process group, sotp_size=ep_sizeruns raised on the first forward. The olderep_router+moe_tp_expertsplan was never applied either, since the override renamed both styles and the mixin matched neither.Mega MoE dispatches inside its kernel, so it takes over the experts rule (
ep_dispatch_experts->megamoe_experts), runs on the TP group like masked EP, and requiresep_size == tp_size.What does this PR do?
Fixes # (issue)
Code Agent Policy
The Transformers repo is currently being overwhelmed by a large number of PRs and issue comments written by
code agents. These often are low-quality, or fix extremely minor issues that occur rarely or never in practice.
As a result, we're instituting a rule that first-time contributors should not use code agents to submit PRs or issues.
We'd also ask autonomous "OpenClaw"-like agents not to open any PRs or issues.
Issues/PRs from first-time contributors that violate this rule will probably just be closed without review, and we
might block you, especially if you open more than one or appear to be deliberately ignoring this. We especially do not
want new contributors to jump in on random issues to contribute an agent-written fix. This creates lots of noise
for reviewers and other users and will almost certainly get you blocked.
For more information, please read
CONTRIBUTING.md.Before submitting
Pull Request checks?
to it if that's the case.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.