Skip to content

Commit f7a7f79

Browse files
authored
fix minimax aoa config (#4379)
1 parent 8e282da commit f7a7f79

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

paddleformers/transformers/minimax_m2/modeling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def _gen_aoa_config(cls, config: MiniMaxM2Config):
467467
f"{prefix}.block_sparse_moe.experts.{expert_id}.w1.weight^T, {prefix}.block_sparse_moe.experts.{expert_id}.w3.weight^T -> {prefix_offset}.mlp.experts.{expert_id}.up_gate_proj.weight, axis=1",
468468
]
469469

470-
if (config.moe_grouped_gemm or using_sonic_moe) and not config.fp8:
470+
if config.moe_grouped_gemm or using_sonic_moe:
471471
ep_weight1 = []
472472
ep_weight2 = []
473473
for expert_id in range(num_experts):
@@ -616,7 +616,7 @@ def _gen_inv_aoa_config(cls, config: MiniMaxM2Config):
616616
# for mtp
617617
prefix_offset += ".transformer_layer"
618618

619-
if (config.moe_grouped_gemm or using_sonic_moe) and not config.fp8:
619+
if config.moe_grouped_gemm or using_sonic_moe:
620620
ep_weight1 = []
621621
ep_weight2 = []
622622
for expert_id in range(config.n_routed_experts):

0 commit comments

Comments
 (0)