Skip to content

Fix Lfm2 and common tests #39398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/models/lfm2/test_modeling_lfm2.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ def test_contrastive_generate_dict_outputs_use_cache(self):
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
Expand Down
1 change: 1 addition & 0 deletions tests/test_modeling_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4484,6 +4484,7 @@ def test_torch_compile_for_training(self):
),
"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
Expand Down