DeepSpeed
bef80db2 - [MoE] Validate grouped AutoEP top-k routing (#8630)

Commit
5 days ago
[MoE] Validate grouped AutoEP top-k routing (#8630) ## Problem Grouped AutoEP masks experts outside the selected groups before `topk`. When `top_k` exceeds the available experts, `torch.topk` fills the remaining slots with masked `-inf` entries and can produce routes outside the configured groups. ## Change Reject the invalid configuration before router construction and during post-detection validation. Update the native MoE `k` documentation to match its arbitrary top-k implementation. ## Validation - `flake8` on changed files. - `yapf --diff` on changed files. - `git diff --check`. - Python `compileall` on changed files. - Runtime tests were not run. Signed-off-by: HR-zengzzz <hrzeng123456@gmail.com> Co-authored-by: Masahiro Tanaka <81312776+tohtana@users.noreply.github.com>
Author
Parents
Loading