From 8165c703ab4284a189cef18dd7c8bad767318e75 Mon Sep 17 00:00:00 2001 From: Cyril Vallez Date: Mon, 14 Jul 2025 12:02:59 +0200 Subject: [PATCH] Fix Lfm2 and common tests (#39398) * fix * better fix * typo --- tests/models/lfm2/test_modeling_lfm2.py | 6 ++++++ tests/test_modeling_common.py | 1 + 2 files changed, 7 insertions(+) diff --git a/tests/models/lfm2/test_modeling_lfm2.py b/tests/models/lfm2/test_modeling_lfm2.py index 173e5e101d..7921fcbf15 100644 --- a/tests/models/lfm2/test_modeling_lfm2.py +++ b/tests/models/lfm2/test_modeling_lfm2.py @@ -85,6 +85,12 @@ class Lfm2ModelTest(CausalLMModelTest, unittest.TestCase): def test_contrastive_generate_low_memory(self): pass + @unittest.skip( + "Lfm2 has a special cache format which is not compatible with compile as it has static address for conv cache" + ) + def test_sdpa_can_compile_dynamic(self): + pass + @require_torch_accelerator @require_read_token diff --git a/tests/test_modeling_common.py b/tests/test_modeling_common.py index ffe90d13c5..2550af4227 100755 --- a/tests/test_modeling_common.py +++ b/tests/test_modeling_common.py @@ -4484,6 +4484,7 @@ class ModelTesterMixin: ), "position_ids": torch.arange(0, 10, device=torch_device).unsqueeze(0), "labels": torch.randint(low=1, high=model.config.vocab_size, size=(2, 10), device=torch_device), + "use_cache": False, } # eager backward