Skip to content

Move the remaining router-masked MoE plans to ep_dispatch_experts - #49607

Merged
vasqu merged 3 commits into
mainfrom
ep-move-router-plans
Nov 12, 2026
Merged

vasqu merged 3 commits into
mainfrom
ep-move-router-plans

Conversation

@IlyasMoutawwakil

@IlyasMoutawwakil IlyasMoutawwakil commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

🤗 Transformers CI

Depends on #49606.

Gemma 4, DiffusionGemma, GraniteMoE-SWA, HY-V4, Inkling and MiMo-V2-Flash still defaulted to the router-masked EP plan: ep_router on the router and moe_tp_experts on the experts. Their experts take (hidden_states, top_k_index, top_k_weights) like every other experts class. So their EP plans move to ep_dispatch_experts.

With ep_dispatch_experts, these models:

Changes

  • The configs of the six models, and the modular files they come from, drop the ep_router rule and use "layers.*...experts": "ep_dispatch_experts".
  • Qwen3-MoE, Mellum and Beam drop the plan comment that pointed to the router-masked plan.
  • The docs no longer list Gemma 4 among the models that default to masking.

Still on ep_router after this PR:

#49615 then removes ep_router.

Tests

Test Result
TP and EP tests of the six models plus Beam and Qwen3-MoE, on CPU pass, apart from Inkling tests that fail on the parent branch too (scipy is missing in the test env)
tests/expert_parallel, 2 ranks on gloo 8 passed
Modular conversion and copies checks clean

🤖 Generated with Claude Code

@HuggingFaceDocBuilderDev

HuggingFaceDocBuilderDev commented Oct 14, 2026 •

Copy link
Copy Markdown

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.

Pages changed in this PR:

@IlyasMoutawwakil
IlyasMoutawwakil changed the base branch from ep-masked-when-shared-batch to ep-passthrough-strategy October 14, 2026 16:49
@IlyasMoutawwakil IlyasMoutawwakil changed the title Move the remaining router-masked MoE models onto ep_dispatch_experts Migrate remaining router-masked MoE models to ep_dispatch_experts Oct 16, 2026
@IlyasMoutawwakil IlyasMoutawwakil changed the title Migrate remaining router-masked MoE models to ep_dispatch_experts Move the remaining router-masked MoE plans to ep_dispatch_experts Nov 2, 2026
@qgallouedec qgallouedec mentioned this pull request Nov 4, 2026

@vasqu vasqu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be sure we didnt accidentally add another model that had this 😬

@IlyasMoutawwakil
IlyasMoutawwakil enabled stacked auto-merge November 12, 2026 15:02
@IlyasMoutawwakil
IlyasMoutawwakil added this pull request to the merge queue Nov 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 12, 2026
Base automatically changed from ep-passthrough-strategy to main November 12, 2026 15:44
IlyasMoutawwakil and others added 3 commits November 12, 2026 15:44
Gemma 4, DiffusionGemma, GraniteMoE-SWA, HY-V4, Inkling and MiMo-V2-Flash call their experts with expert ids like
every other experts class, so their EP plans drop `ep_router` + `moe_tp_experts` for `ep_dispatch_experts`, which
runs the all-reduce at inference and token dispatch in training. Qwen3-MoE and Mellum stop pointing users at the
router-masked plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…defaults in the docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: beam, diffusion_gemma, gemma4, hy_v4, inkling, mellum, mimo_v2_flash, qwen3_moe

@vasqu
vasqu added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 290c247 Nov 12, 2026
63 checks passed
@vasqu
vasqu deleted the ep-move-router-plans branch November 12, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants