From 0d51fa13f703ac42f9083660710d3823b30e4e9f Mon Sep 17 00:00:00 2001 From: Joao Gante Date: Fri, 5 Sep 2025 14:20:39 +0000 Subject: [PATCH] rm tests from method moved to hub --- .../deepseek_v3/test_modeling_deepseek_v3.py | 4 ---- tests/models/gemma3n/test_modeling_gemma3n.py | 21 ------------------- tests/models/git/test_modeling_git.py | 12 ----------- tests/models/idefics/test_modeling_idefics.py | 15 ------------- tests/models/minimax/test_modeling_minimax.py | 8 ------- tests/models/mllama/test_modeling_mllama.py | 10 --------- tests/models/moshi/test_modeling_moshi.py | 12 ----------- .../test_modeling_qwen2_5_omni.py | 12 ----------- .../test_modeling_recurrent_gemma.py | 12 ----------- 9 files changed, 106 deletions(-) diff --git a/tests/models/deepseek_v3/test_modeling_deepseek_v3.py b/tests/models/deepseek_v3/test_modeling_deepseek_v3.py index 9a7028ecc831..9ed521509408 100644 --- a/tests/models/deepseek_v3/test_modeling_deepseek_v3.py +++ b/tests/models/deepseek_v3/test_modeling_deepseek_v3.py @@ -263,10 +263,6 @@ def test_prompt_lookup_decoding_matches_greedy_search(self, assistant_type): def test_assisted_decoding_sample(self): pass - @unittest.skip("DeepseekV3 doesn't support contrastive generation") - def test_contrastive_generate_dict_outputs_use_cache(self): - pass - @unittest.skip("Deepseek-V3 uses MLA so it is not compatible with the standard cache format") def test_beam_search_generate_dict_outputs_use_cache(self): pass diff --git a/tests/models/gemma3n/test_modeling_gemma3n.py b/tests/models/gemma3n/test_modeling_gemma3n.py index 4e2581757a1c..fe6dfb05edd5 100644 --- a/tests/models/gemma3n/test_modeling_gemma3n.py +++ b/tests/models/gemma3n/test_modeling_gemma3n.py @@ -405,27 +405,6 @@ def test_eager_matches_sdpa_inference( self, name, dtype, padding_side, use_attention_mask, output_attentions, enable_kernels, atols=atols ) - @pytest.mark.generate - @unittest.skip( - "Gemma3n has a special shape for hidden states (due to per-layer projs) which is not compatible with contrastive decoding" - ) - def test_contrastive_generate(self): - pass - - @pytest.mark.generate - @unittest.skip( - "Gemma3n has a special shape for hidden states (due to per-layer projs) which is not compatible with contrastive decoding" - ) - def test_contrastive_generate_dict_outputs_use_cache(self): - pass - - @pytest.mark.generate - @unittest.skip( - "Gemma3n has a special shape for hidden states (due to per-layer projs) which is not compatible with contrastive decoding" - ) - def test_contrastive_generate_low_memory(self): - pass - @pytest.mark.generate @unittest.skip("Gemma3n does not support QuantizedCache as it performs cache manipulation in the forward pass") def test_generate_with_quant_cache(self): diff --git a/tests/models/git/test_modeling_git.py b/tests/models/git/test_modeling_git.py index 493c525751bf..931b3fcc8f07 100644 --- a/tests/models/git/test_modeling_git.py +++ b/tests/models/git/test_modeling_git.py @@ -455,18 +455,6 @@ def test_model_from_pretrained(self): def test_beam_search_generate_dict_outputs_use_cache(self): pass - @unittest.skip(reason="GIT has pixel values as additional input") - def test_contrastive_generate(self): - pass - - @unittest.skip(reason="GIT has pixel values as additional input") - def test_contrastive_generate_dict_outputs_use_cache(self): - pass - - @unittest.skip(reason="GIT has pixel values as additional input") - def test_contrastive_generate_low_memory(self): - pass - @unittest.skip(reason="GIT has pixel values as additional input") def test_greedy_generate_dict_outputs_use_cache(self): pass diff --git a/tests/models/idefics/test_modeling_idefics.py b/tests/models/idefics/test_modeling_idefics.py index 454b38975cdd..2baf576e99eb 100644 --- a/tests/models/idefics/test_modeling_idefics.py +++ b/tests/models/idefics/test_modeling_idefics.py @@ -496,21 +496,6 @@ def test_generate_without_input_ids(self): def test_generate_continue_from_inputs_embeds(self): pass - @pytest.mark.generate - @unittest.skip(reason="""IDEFICS cannot do contrastive generation yet and it is not worth fixing""") - def test_contrastive_generate(self): - pass - - @pytest.mark.generate - @unittest.skip(reason="""IDEFICS cannot do contrastive generation yet and it is not worth fixing""") - def test_contrastive_generate_low_memory(self): - pass - - @pytest.mark.generate - @unittest.skip(reason="""IDEFICS cannot do contrastive generation yet and it is not worth fixing""") - def test_contrastive_generate_dict_outputs_use_cache(self): - pass - def test_attention_outputs(self): config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common() config.return_dict = True diff --git a/tests/models/minimax/test_modeling_minimax.py b/tests/models/minimax/test_modeling_minimax.py index 4985d9ac1a2f..00b76b0e389b 100644 --- a/tests/models/minimax/test_modeling_minimax.py +++ b/tests/models/minimax/test_modeling_minimax.py @@ -209,10 +209,6 @@ def test_past_key_values_format(self, custom_all_cache_shapes=None): def test_prompt_lookup_decoding_matches_greedy_search(self): pass - @unittest.skip(reason="MiniMaxCache does not support `crop()` method") - def test_contrastive_generate_low_memory(self): - pass - @unittest.skip(reason="MiniMaxCache does not support `crop()` method") def test_assisted_decoding_sample(self): pass @@ -225,10 +221,6 @@ def test_assisted_decoding_matches_greedy_search_0_random(self): def test_assisted_decoding_matches_greedy_search_1_same(self): pass - @unittest.skip(reason="MiniMaxCache does not support `crop()` method") - def test_contrastive_generate_dict_outputs_use_cache(self): - pass - @unittest.skip("Model needs refactor") def test_attention_outputs(self): pass diff --git a/tests/models/mllama/test_modeling_mllama.py b/tests/models/mllama/test_modeling_mllama.py index 41fb6aeb4e46..ca5579ecb058 100644 --- a/tests/models/mllama/test_modeling_mllama.py +++ b/tests/models/mllama/test_modeling_mllama.py @@ -368,16 +368,6 @@ def test_sdpa_can_compile_dynamic(self): def test_model_parallelism(self): pass - @unittest.skip( - reason="Mllama cache type doesn't allow correct check on output `past_key_values` due to `Cache.crop()`" - ) - def test_contrastive_generate_dict_outputs_use_cache(self, assistant_type): - pass - - @unittest.skip(reason="Mllama can't do low memory due to `Cache.crop()`") - def test_contrastive_generate_low_memory(self, assistant_type): - pass - @unittest.skip(reason="Mllama can't assisted decoding due to cache format and `Cache.crop()`") def test_assisted_decoding_with_num_logits_to_keep(self): pass diff --git a/tests/models/moshi/test_modeling_moshi.py b/tests/models/moshi/test_modeling_moshi.py index cc33f1492dd3..b6a848503117 100644 --- a/tests/models/moshi/test_modeling_moshi.py +++ b/tests/models/moshi/test_modeling_moshi.py @@ -603,18 +603,6 @@ def test_initialization(self): def test_generate_continue_from_past_key_values(self): pass - @unittest.skip("Moshi doesn't support contrastive generation yet.") - def test_contrastive_generate(self): - pass - - @unittest.skip("Moshi doesn't support contrastive generation yet.") - def test_contrastive_generate_dict_outputs_use_cache(self): - pass - - @unittest.skip("Moshi doesn't support contrastive generation yet.") - def test_contrastive_generate_low_memory(self): - pass - @unittest.skip( "Moshi either needs default generation config or fix for fullgraph compile because it hardcodes SlidingWindowCache in custom generation loop." ) diff --git a/tests/models/qwen2_5_omni/test_modeling_qwen2_5_omni.py b/tests/models/qwen2_5_omni/test_modeling_qwen2_5_omni.py index fc0dad508805..32ebdd0ab036 100644 --- a/tests/models/qwen2_5_omni/test_modeling_qwen2_5_omni.py +++ b/tests/models/qwen2_5_omni/test_modeling_qwen2_5_omni.py @@ -418,18 +418,6 @@ def attention_mask_padding_matches_padding_free_with_position_ids( tol = torch.finfo(torch.bfloat16).eps torch.testing.assert_close(logits_padded, logits_padfree, rtol=tol, atol=tol) - @unittest.skip("Cannot do contrastive generation, has custom `generate()`") - def test_contrastive_generate(self): - pass - - @unittest.skip("Cannot do contrastive generation, has custom `generate()`") - def test_contrastive_generate_dict_outputs_use_cache(self): - pass - - @unittest.skip("Cannot do contrastive generation, has custom `generate()`") - def test_contrastive_generate_low_memory(self): - pass - @unittest.skip("Cannot generate from inputs embeds") def test_generate_from_inputs_embeds_with_static_cache(self): pass diff --git a/tests/models/recurrent_gemma/test_modeling_recurrent_gemma.py b/tests/models/recurrent_gemma/test_modeling_recurrent_gemma.py index 687248e9543e..29f85455c50e 100644 --- a/tests/models/recurrent_gemma/test_modeling_recurrent_gemma.py +++ b/tests/models/recurrent_gemma/test_modeling_recurrent_gemma.py @@ -66,18 +66,6 @@ class RecurrentGemmaModelTest(CausalLMModelTest, unittest.TestCase): def test_eager_matches_sdpa_generate(self): pass - @unittest.skip(reason="RecurrentGemma does not return the cache") - def test_contrastive_generate_low_memory(self): - pass - - @unittest.skip(reason="RecurrentGemma does not return the cache") - def test_contrastive_generate_dict_outputs_use_cache(self): - pass - - @unittest.skip(reason="RecurrentGemma does not return the cache") - def test_contrastive_generate(self): - pass - @unittest.skip(reason="SQRBound is known to have issues with gc") def test_training_gradient_checkpointing_use_reentrant_false(self): pass