Skip to content

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

Open
IlyasMoutawwakil wants to merge 12 commits into
ep-passthrough-strategyfrom
ep-move-router-plans
Open

IlyasMoutawwakil wants to merge 12 commits into
ep-passthrough-strategyfrom
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 and others added 2 commits October 27, 2026 06:16
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>
IlyasMoutawwakil and others added 2 commits November 2, 2026 05:52
…defaults in the docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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
@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

This branch has not been deployed

No deployments
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