From e2b8463c80367730db57d5c38c8835ab326ab468 Mon Sep 17 00:00:00 2001 From: zhangxiaolei Date: Sat, 28 Mar 2026 07:23:24 +0800 Subject: [PATCH] [fix] qwen3.5 fuse_moe_triton_tune bug (#20232) --- benchmark/kernels/fused_moe_triton/common_utils.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/benchmark/kernels/fused_moe_triton/common_utils.py b/benchmark/kernels/fused_moe_triton/common_utils.py index b7d5b4cc6..37a9607b6 100644 --- a/benchmark/kernels/fused_moe_triton/common_utils.py +++ b/benchmark/kernels/fused_moe_triton/common_utils.py @@ -37,11 +37,7 @@ def get_model_config( topk_ids_dir: str = None, ) -> Dict: config = get_config(model_name, trust_remote_code=True) - - # Replace config with text_config for encoder-decoder models after getting block_shape and architecture - if hasattr(config, "text_config"): - config = config.get_text_config() - + architecture = config.architectures[0] block_shape = None if ( hasattr(config, "quantization_config") @@ -61,8 +57,9 @@ def get_model_config( group_size = weights_config.get("group_size") block_shape = [0, group_size] assert len(block_shape) == 2 - - architecture = config.architectures[0] + # Replace config with text_config for encoder-decoder models after getting block_shape and architecture + if hasattr(config, "text_config"): + config = config.get_text_config() hidden_size = config.hidden_size if architecture == "DbrxForCausalLM":