diff --git a/tests/models/utils.py b/tests/models/utils.py index 8a62955213..1c4b9c93b0 100644 --- a/tests/models/utils.py +++ b/tests/models/utils.py @@ -507,7 +507,13 @@ def dummy_hf_overrides( # Only set MoE related config when the model has MoE layers. # Otherwise all models detected as MoE by _get_transformers_backend_cls. if model_arch_config.num_experts > 0: - num_experts_per_tok = 1 if model_arch == "Llama4ForConditionalGeneration" else 2 + num_experts_per_tok = 2 + if model_arch in ( + "Llama4ForConditionalGeneration", + "Llama4ForCausalLM", + "EagleLlama4ForCausalLM", + ): + num_experts_per_tok = 1 update_dict.update( { "num_experts": num_experts,