Skip to content

Commit a9499f3

Browse files
hmellorwuisawesome
authored andcommitted
Bump Transformers to 4.51.3 (vllm-project#17116)
Signed-off-by: Harry Mellor <[email protected]>
1 parent 0d360ee commit a9499f3

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

requirements/test.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ num2words # required for smolvlm test
3434
opencv-python-headless >= 4.11.0 # required for video test
3535
datamodel_code_generator # required for minicpm3 test
3636
lm-eval[api]==0.4.8 # required for model evaluation test
37-
transformers==4.51.1
37+
transformers==4.51.3
3838
tokenizers==0.21.1
3939
huggingface-hub[hf_xet]>=0.30.0 # Required for Xet downloads.
4040
schemathesis>=3.39.15 # Required for openai schema test.

requirements/test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ tqdm==4.66.6
737737
# transformers
738738
tqdm-multiprocess==0.0.11
739739
# via lm-eval
740-
transformers==4.51.1
740+
transformers==4.51.3
741741
# via
742742
# -r requirements/test.in
743743
# genai-perf

tests/models/decoder_only/language/test_models.py

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from vllm.platforms import current_platform
1111

12+
from ...registry import HF_EXAMPLE_MODELS
1213
from ...utils import check_logprobs_close
1314

1415
# These have unsupported head_dim for FA. We do not
@@ -33,54 +34,50 @@
3334

3435
# @maybe_test_rocm_aiter
3536
@pytest.mark.parametrize(
36-
"model",
37+
"model_arch",
3738
[
3839
pytest.param(
39-
"bigscience/bloom-560m", # bloom - testing alibi slopes
40+
"BloomForCausalLM", # testing alibi slopes
4041
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
4142
),
4243
pytest.param(
43-
"openai-community/gpt2", # gpt2
44+
"GPT2LMHeadModel", # gpt2
4445
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
4546
),
46-
pytest.param("Milos/slovak-gpt-j-405M"), # gptj
47-
pytest.param("bigcode/tiny_starcoder_py"), # gpt_bigcode
48-
pytest.param("EleutherAI/pythia-70m"), # gpt_neox
47+
pytest.param("GPTJForCausalLM"),
48+
pytest.param("GPTBigCodeForCausalLM"),
49+
pytest.param("GPTNeoXForCausalLM"),
4950
pytest.param(
50-
"google/gemma-1.1-2b-it", # gemma
51+
"GemmaForCausalLM", # gemma
5152
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
5253
),
54+
pytest.param("GlmForCausalLM"),
5355
pytest.param(
54-
"THUDM/chatglm3-6b", # chatglm (text-only)
55-
),
56-
pytest.param(
57-
"meta-llama/Llama-3.2-1B-Instruct", # llama
56+
"LlamaForCausalLM",
5857
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
5958
),
6059
pytest.param(
61-
"openbmb/MiniCPM3-4B",
60+
"MiniCPM3ForCausalLM",
6261
# fused_moe not supported on CPU
6362
marks=[pytest.mark.core_model],
6463
),
6564
pytest.param(
66-
"facebook/opt-125m", # opt
65+
"OPTForCausalLM",
6766
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
6867
),
6968
pytest.param(
70-
"microsoft/phi-2", # phi
69+
"PhiForCausalLM",
7170
marks=[pytest.mark.core_model],
7271
),
72+
pytest.param("QWenLMHeadModel", ),
7373
pytest.param(
74-
"Qwen/Qwen-7B", # qwen (text-only)
75-
),
76-
pytest.param(
77-
"Qwen/Qwen2.5-0.5B-Instruct", # qwen2
74+
"Qwen2ForCausalLM",
7875
marks=[pytest.mark.core_model],
7976
),
80-
pytest.param("stabilityai/stablelm-3b-4e1t"), # stablelm
81-
pytest.param("bigcode/starcoder2-3b"), # starcoder2
77+
pytest.param("StableLmForCausalLM"),
78+
pytest.param("Starcoder2ForCausalLM"),
8279
pytest.param(
83-
"ehristoforu/Falcon3-MoE-2x7B-Insruct", # mixtral
80+
"MixtralForCausalLM",
8481
marks=[pytest.mark.cpu_model],
8582
)
8683
])
@@ -89,10 +86,12 @@
8986
@pytest.mark.parametrize("num_logprobs", [5])
9087
@pytest.mark.parametrize(
9188
"use_rocm_aiter", [True, False] if current_platform.is_rocm() else [False])
92-
def test_models(hf_runner, vllm_runner, example_prompts, model: str,
89+
def test_models(hf_runner, vllm_runner, example_prompts, model_arch: str,
9390
dtype: str, max_tokens: int, num_logprobs: int,
9491
use_rocm_aiter: bool, monkeypatch) -> None:
9592

93+
model = HF_EXAMPLE_MODELS.get_hf_info(model_arch).default
94+
9695
if model in REQUIRES_V0:
9796
monkeypatch.setenv("VLLM_USE_V1", "0")
9897

tests/models/registry.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ def check_available_online(
123123
"BambaForCausalLM": _HfExamplesInfo("ibm-ai-platform/Bamba-9B"),
124124
"BloomForCausalLM": _HfExamplesInfo("bigscience/bloomz-1b1"),
125125
"ChatGLMModel": _HfExamplesInfo("THUDM/chatglm3-6b",
126-
trust_remote_code=True),
126+
trust_remote_code=True,
127+
max_transformers_version="4.51.1"),
127128
"ChatGLMForConditionalGeneration": _HfExamplesInfo("thu-coai/ShieldLM-6B-chatglm3", # noqa: E501
128129
trust_remote_code=True),
129130
"CohereForCausalLM": _HfExamplesInfo("CohereForAI/c4ai-command-r-v01",

0 commit comments

Comments
 (0)