Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/microbenchmarks/bench_moe/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _create_routing_method(
topk_group=topk_group,
routed_scaling_factor=1.0,
callable_e_score_correction_bias=lambda: e_score_correction_bias,
is_fused=False,
is_fused=True,
)

if routing_method_cls is MiniMaxM2MoeRoutingMethod:
Expand Down
13 changes: 13 additions & 0 deletions tests/microbenchmarks/bench_moe/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,19 @@ def is_candidate_valid(
"use DEP/TEP modes only"
)

# MegaMoEDeepGemm does not support TEP: its DeepGEMM fp8_fp4_mega_moe kernel
# assumes the MoE input is partitioned across ranks (single rank, or DEP with
# ep_size == parallel_size). TEP replicates the input TP-wide, so
# MegaMoEDeepGemm.__init__ raises NotImplementedError (enable_attention_dp=False,
# parallel_size>1). Prune here so the sweep records status="skipped" instead of a
# hard build failure.
if config.backend.upper() == "MEGAMOE_DEEPGEMM" and not enable_dp and world_size > 1:
return False, (
f"MEGAMOE_DEEPGEMM does not support TEP (enable_attention_dp=False, "
f"parallel_size={world_size}>1); use DEP with ep_size==parallel_size "
"or enable attention-DP"
)

# DENSEGEMM DTP: FC2 kernel requires (intermediate_size / moe_tp_size) % 256 == 0.
# DENSEGEMM __init__ only checks the full intermediate_size, so a model like
# DeepSeek V3 (intermediate_size=2048, 2048%256=0) passes __init__ but fails
Expand Down
17 changes: 17 additions & 0 deletions tests/microbenchmarks/bench_moe/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,23 @@ class RunResult:
intermediate_size=2048,
quant_algo="FP8_BLOCK_SCALES",
routing_method="DEEPSEEK_V3",
n_group=1,
topk_group=1,
),
# GLM-5 (zai-org/GLM-5): 256 routed experts, top-8, sigmoid/noaux_tc
# (DeepSeek-V3-style) routing with a single expert group (n_group=1,
# topk_group=1). intermediate_size is the per-expert moe_intermediate_size.
# quant_algo left None: pass --quant on the CLI (the glm_5 sweep uses NVFP4).
"glm_5": ModelSpec(
name="glm_5",
num_experts=256,
top_k=8,
hidden_size=6144,
intermediate_size=2048,
quant_algo=None,
routing_method="DEEPSEEK_V3",
n_group=1,
topk_group=1,
),
# DeepSeek-V4-Pro: 1.6T total / 49B activated. quant_algo intentionally
# left None: pass --quant on the CLI to pin the mode (the released
Expand Down
Loading