From 76fedaa2a5382e4b76d236253da55b0646b1459c Mon Sep 17 00:00:00 2001 From: Yejing Lai Date: Sat, 11 Jul 2026 21:56:55 +0800 Subject: [PATCH] [XPU][UT]Fix InternS1ProForConditionalGeneration AssertionError (#48232) Signed-off-by: Lai, Yejing --- tests/models/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/models/utils.py b/tests/models/utils.py index f1018efe8a..86fd80cd62 100644 --- a/tests/models/utils.py +++ b/tests/models/utils.py @@ -468,6 +468,9 @@ def dummy_hf_overrides( # Kimi uses `num_expert_group` instead of `n_group`. if n_group is None: n_group = getattr(text_config, "num_expert_group", None) + # InternS1Pro uses `router_n_groups` instead of `n_group`. + if n_group is None: + n_group = getattr(text_config, "router_n_groups", None) num_experts = n_group * 2 if n_group is not None else 2 # we use three layers for Gemma-3n to check @@ -515,6 +518,9 @@ def dummy_hf_overrides( "EagleLlama4ForCausalLM", ): num_experts_per_tok = 1 + elif model_arch == "InternS1ProForConditionalGeneration": + assert n_group is not None + num_experts_per_tok = n_group update_dict.update( { "num_experts": num_experts,