diff --git a/tests/models/multimodal/processing/test_tensor_schema.py b/tests/models/multimodal/processing/test_tensor_schema.py index 5afcab9f32..12c5071978 100644 --- a/tests/models/multimodal/processing/test_tensor_schema.py +++ b/tests/models/multimodal/processing/test_tensor_schema.py @@ -180,6 +180,7 @@ def test_model_tensor_schema(model_id: str): dummy_hf_overrides, model_arch=model_arch, exist_overrides=model_info.hf_overrides, + use_original_num_layers=getattr(model_info, "use_original_num_layers", False), ) # ROCm: Detect if model uses AWQ quantization and set appropriate dtype diff --git a/tests/models/registry.py b/tests/models/registry.py index 3ef6997621..2d119e78d5 100644 --- a/tests/models/registry.py +++ b/tests/models/registry.py @@ -1372,7 +1372,14 @@ _MULTIMODAL_EXAMPLE_MODELS = { "stepfun-ai/Step3-VL-10B", trust_remote_code=True ), "Step3p7ForConditionalGeneration": _HfExamplesInfo( - "stepfun-ai/Step-3.7-Flash", is_available_online=False, trust_remote_code=True + "stepfun-ai/Step-3.7-Flash", + trust_remote_code=True, + use_original_num_layers=True, + # The MoE config lives in the nested ``text_config``, so the overrides + # must be nested too. Use 4 layers to initialize at least one MoE layer + # and shrink ``moe_num_experts`` (a non-standard key not handled by + # ``dummy_hf_overrides``) to avoid OOM during init. + hf_overrides={"text_config": {"num_hidden_layers": 4, "moe_num_experts": 8}}, ), "UltravoxModel": _HfExamplesInfo( "fixie-ai/ultravox-v0_5-llama-3_2-1b",