Fix --moe-a2a-backend silently ignored for LongCat-2.0 (moe_topk missing from gate) (#30975)

Co-authored-by: whn09 <whn09@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
王鹤男
2026-07-16 14:40:01 +08:00
committed by GitHub
co-authored by whn09 Claude Opus 4.8
parent 5af65d8542
commit 0a64139c94
+3 -1
View File
@@ -729,12 +729,14 @@ class Scheduler(
) )
# Different MoE architectures expose the per-token expert count under # Different MoE architectures expose the per-token expert count under
# different attribute names (e.g. Gemma4 uses ``top_k_experts``). # different attribute names (e.g. Gemma4 uses ``top_k_experts``,
# LongCat-2.0 uses ``moe_topk``).
moe_topk_attrs = ( moe_topk_attrs = (
"num_experts_per_tok", "num_experts_per_tok",
"num_experts_per_token", "num_experts_per_token",
"top_k_experts", "top_k_experts",
"moe_top_k", "moe_top_k",
"moe_topk",
) )
if any(hasattr(config_to_check, attr) for attr in moe_topk_attrs): if any(hasattr(config_to_check, attr) for attr in moe_topk_attrs):
initialize_moe_config(self.server_args) initialize_moe_config(self.server_args)