[None][feat] Add kimi_k2/glm_5 grouped routing and fused router to bench_moe#16830
[None][feat] Add kimi_k2/glm_5 grouped routing and fused router to bench_moe#16830guqiqi wants to merge 1 commit into
Conversation
876efbc to
d738c12
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughThe MoE microbenchmark adds a ChangesMoE benchmark updates
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
d738c12 to
201960c
Compare
…nch_moe - specs.py: set kimi_k2 n_group=1/topk_group=1 (real Kimi-K2 uses a single expert group; avoids the TRTLLM routing kernel topk_group<=4 failure); add glm_5 model spec (256 experts, top-8, DeepSeek-V3-style single-group routing). - mapping.py: use fused DeepSeek-V3 routing (is_fused=True). - search.py: prune MEGAMOE_DEEPGEMM + TEP as skipped instead of a hard build failure (kernel assumes partitioned MoE input; TEP replicates TP-wide). Signed-off-by: kikig <29116997+guqiqi@users.noreply.github.com>
201960c to
f73f203
Compare
|
/bot run |
|
PR_Github #61523 [ run ] triggered by Bot. Commit: |
|
PR_Github #61523 [ run ] completed with state |
Dev Engineer Review
tests/microbenchmarks/bench_moe/mapping.pyto constructDeepSeekV3MoeRoutingMethodwithis_fused=True, enabling the fused DeepSeek-V3 routing path for this benchmark configuration.tests/microbenchmarks/bench_moe/specs.pyupdateskimi_k2ton_group=1/topk_group=1and adds a newglm_5ModelSpecwithrouting_method="DEEPSEEK_V3",n_group=1/topk_group=1, andquant_algo=None.tests/microbenchmarks/bench_moe/search.pyrejectsMEGAMOE_DEEPGEMMwhenenable_dpis false (TEP) andworld_size > 1, recording the candidate as skipped instead of hard-failing during backend initialization.bench_moemicrobenchmark code/specs; no unrelated config/test-list changes were made.QA Engineer Review
tests/microbenchmarks/bench_moe/:mapping.py:_create_routing_method(DeepSeek-V3 routing construction now usesis_fused=True).search.py:is_candidate_valid(adds early prune forMEGAMOE_DEEPGEMM+ TEP whenenable_dpis false andworld_size > 1).specs.py:BUILT_IN_MODELSregistry (addsglm_5, updateskimi_k2routing grouping ton_group=1/topk_group=1).tests/integration/test_lists/(e.g.,test-db/,qa/,waives.txt) forbench_moe/microbenchmarks/bench_moe.Description
This PR adds
bench_moesupport for two additional MoE models and fixes a routingconfiguration issue for Kimi-K2:
specs.py: setkimi_k2n_group=1/topk_group=1. Real Kimi-K2 uses a singleexpert group; the previous multi-group value tripped the TRT-LLM routing kernel
assertion
topk_group <= 4and failed the build. Also adds aglm_5model spec(256 experts, top-8, DeepSeek-V3-style single-group routing).
mapping.py: use the fused DeepSeek-V3 routing path (is_fused=True) for these specs.search.py: mark theMEGAMOE_DEEPGEMM+ TEP combination as skipped rather than ahard build failure. That kernel assumes a partitioned MoE input, whereas TEP replicates
the tensor TP-wide, so the combination is not valid and should be pruned from the sweep.
The change is scoped entirely to the
bench_moebenchmarking utility and does not touchruntime/serving code paths.
Test Coverage
Validated by running the
bench_moesweep locally forkimi_k2andglm_5:the previously-failing Kimi-K2 routing build now succeeds,
glm_5is enumerated andbenchmarked, and
MEGAMOE_DEEPGEMM+TEP entries are reported as skipped instead of abortingthe sweep.
PR Checklist
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.