[breaking] support transformers 4.48 (#6628)

Former-commit-id: f154ab175c513a4d7bb866bf2cffc34b77b50508
This commit is contained in:
hoshi-hiyouga
2025-01-31 01:36:33 +08:00
committed by GitHub
parent e71737351f
commit 222423bcef
17 changed files with 53 additions and 105 deletions

View File

@@ -14,8 +14,10 @@
import os
import pytest
from transformers.utils import is_flash_attn_2_available, is_torch_sdpa_available
from llamafactory.extras.packages import is_transformers_version_greater_than
from llamafactory.train.test_utils import load_infer_model
@@ -27,6 +29,7 @@ INFER_ARGS = {
}
@pytest.mark.xfail(is_transformers_version_greater_than("4.48"), reason="Attention refactor.")
def test_attention():
attention_available = ["disabled"]
if is_torch_sdpa_available():