Skip to content

fix(moe): exclude padding tokens from dropless HybridEP routing - #5928

Closed
FDecaYed wants to merge 1 commit into
NVIDIA:mainfrom
FDecaYed:codex/hybridep-ignore-padding-routes
Closed

fix(moe): exclude padding tokens from dropless HybridEP routing#5928
FDecaYed wants to merge 1 commit into
NVIDIA:mainfrom
FDecaYed:codex/hybridep-ignore-padding-routes

Conversation

@FDecaYed

Copy link
Copy Markdown
Contributor

What

Exclude padding-token rows from the routing probabilities and sparse routing map only for dropless HybridEP. Dispatchers that still require fixed route counts keep their existing behavior.

This is a self-contained correctness prerequisite for the HybridModel-only DSv4 merge effort.

Provenance

Testing

  • uv run isort --check-only megatron/core/transformer/moe/router.py tests/unit_tests/transformer/moe/test_routers.py
  • uv run ruff check megatron/core/transformer/moe/router.py tests/unit_tests/transformer/moe/test_routers.py
  • uv run python -m compileall -q megatron/core/transformer/moe/router.py tests/unit_tests/transformer/moe/test_routers.py
  • CUDA unit tests require the project CUDA/Triton environment and are left to CI.

@copy-pr-bot

copy-pr-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@FDecaYed FDecaYed closed this Jul 21, 2026
@FDecaYed
FDecaYed force-pushed the codex/hybridep-ignore-padding-routes branch from a1a084a to 368fa88 Compare July 21, 2026 14:51
Exclude padding rows before HybridEP consumes the sparse routing map.
Keep fixed-route dispatchers unchanged.

Signed-off-by: Deyu Fu <Deyu.Foo@gmail.com>
@FDecaYed

Copy link
Copy Markdown
Contributor Author

/ok to test 7fd4938

Copy link
Copy Markdown
Contributor Author

Closing this draft until its real dependency round. Its logical successor is P10 (HybridEP packed-token correctness), to be rebuilt after #5008, P4, and P7 merge. The publication diff will use the current #5008 flag name and will reference tracking PR #5795.

@FDecaYed FDecaYed closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant