From f844733568b5093f9afb815bd760ce7208fee62f Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 28 May 2025 16:44:20 +0100 Subject: [PATCH] Fix MoE gradient test (#38438) --- tests/models/phimoe/test_modeling_phimoe.py | 1 + tests/models/qwen2_moe/test_modeling_qwen2_moe.py | 1 + tests/models/qwen3_moe/test_modeling_qwen3_moe.py | 1 + 3 files changed, 3 insertions(+) diff --git a/tests/models/phimoe/test_modeling_phimoe.py b/tests/models/phimoe/test_modeling_phimoe.py index 89bde307b6..f8cf7d455d 100644 --- a/tests/models/phimoe/test_modeling_phimoe.py +++ b/tests/models/phimoe/test_modeling_phimoe.py @@ -102,6 +102,7 @@ class PhimoeModelTest(CausalLMModelTest, unittest.TestCase): test_headmasking = False test_pruning = False + test_all_params_have_gradient = False model_tester_class = PhimoeModelTester pipeline_model_mapping = ( { diff --git a/tests/models/qwen2_moe/test_modeling_qwen2_moe.py b/tests/models/qwen2_moe/test_modeling_qwen2_moe.py index dbfc7a1e68..90a4de27af 100644 --- a/tests/models/qwen2_moe/test_modeling_qwen2_moe.py +++ b/tests/models/qwen2_moe/test_modeling_qwen2_moe.py @@ -83,6 +83,7 @@ class Qwen2MoeModelTest(CausalLMModelTest, unittest.TestCase): test_headmasking = False test_pruning = False + test_all_params_have_gradient = False model_tester_class = Qwen2MoeModelTester # TODO (ydshieh): Check this. See https://app.circleci.com/pipelines/github/huggingface/transformers/79245/workflows/9490ef58-79c2-410d-8f51-e3495156cf9c/jobs/1012146 diff --git a/tests/models/qwen3_moe/test_modeling_qwen3_moe.py b/tests/models/qwen3_moe/test_modeling_qwen3_moe.py index 0ffb74c6c2..b6b97f98d0 100644 --- a/tests/models/qwen3_moe/test_modeling_qwen3_moe.py +++ b/tests/models/qwen3_moe/test_modeling_qwen3_moe.py @@ -82,6 +82,7 @@ class Qwen3MoeModelTest(CausalLMModelTest, unittest.TestCase): test_headmasking = False test_pruning = False + test_all_params_have_gradient = False model_tester_class = Qwen3MoeModelTester # TODO (ydshieh): Check this. See https://app.circleci.com/pipelines/github/huggingface/transformers/79245/workflows/9490ef58-79c2-410d-8f51-e3495156cf9c/jobs/1012146