A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 13:30 UTC
Bump Transformers to 4.51.3 (#17116)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
Apr 25, 2025 at 16:34 UTC
0bd7f8fca521295c4880a0a5a44c41204fd83db7
4 files changed
+25
-25
requirements/test.in
+1
-1
@@ -34,7 +34,7 @@ num2words # required for smolvlm test
34
opencv-python-headless >= 4.11.0 # required for video test
35
datamodel_code_generator # required for minicpm3 test
36
lm-eval[api]==0.4.8 # required for model evaluation test
37
-transformers==4.51.1
37
+transformers==4.51.3
38
tokenizers==0.21.1
39
huggingface-hub[hf_xet]>=0.30.0 # Required for Xet downloads.
40
schemathesis>=3.39.15 # Required for openai schema test.
requirements/test.txt
+1
-1
@@ -737,7 +737,7 @@ tqdm==4.66.6
737
# transformers
738
tqdm-multiprocess==0.0.11
739
# via lm-eval
740
-transformers==4.51.1
740
+transformers==4.51.3
741
# via
742
# -r requirements/test.in
743
# genai-perf
tests/models/decoder_only/language/test_models.py
+21
-22
@@ -9,6 +9,7 @@ import torch
9
10
from vllm.platforms import current_platform
11
12
+from ...registry import HF_EXAMPLE_MODELS
13
from ...utils import check_logprobs_close
14
15
# These have unsupported head_dim for FA. We do not
@@ -33,54 +34,50 @@ AITER_MODEL_LIST = [
34
35
# @maybe_test_rocm_aiter
36
@pytest.mark.parametrize(
36
- "model",
37
+ "model_arch",
38
[
39
pytest.param(
39
- "bigscience/bloom-560m", # bloom - testing alibi slopes
40
+ "BloomForCausalLM", # testing alibi slopes
41
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
42
),
43
pytest.param(
43
- "openai-community/gpt2", # gpt2
44
+ "GPT2LMHeadModel", # gpt2
45
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
46
),
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"),
50
pytest.param(
50
- "google/gemma-1.1-2b-it", # gemma
51
+ "GemmaForCausalLM", # gemma
52
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
53
),
54
+ pytest.param("GlmForCausalLM"),
55
pytest.param(
54
- "THUDM/chatglm3-6b", # chatglm (text-only)
55
- ),
56
- pytest.param(
57
- "meta-llama/Llama-3.2-1B-Instruct", # llama
56
+ "LlamaForCausalLM",
57
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
58
),
59
pytest.param(
61
- "openbmb/MiniCPM3-4B",
60
+ "MiniCPM3ForCausalLM",
61
# fused_moe not supported on CPU
62
marks=[pytest.mark.core_model],
63
),
64
pytest.param(
66
- "facebook/opt-125m", # opt
65
+ "OPTForCausalLM",
66
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
67
),
68
pytest.param(
70
- "microsoft/phi-2", # phi
69
+ "PhiForCausalLM",
70
marks=[pytest.mark.core_model],
71
),
72
+ pytest.param("QWenLMHeadModel", ),
73
pytest.param(
74
- "Qwen/Qwen-7B", # qwen (text-only)
75
- ),
76
- pytest.param(
77
- "Qwen/Qwen2.5-0.5B-Instruct", # qwen2
74
+ "Qwen2ForCausalLM",
75
marks=[pytest.mark.core_model],
76
),
80
- pytest.param("stabilityai/stablelm-3b-4e1t"), # stablelm
81
- pytest.param("bigcode/starcoder2-3b"), # starcoder2
77
+ pytest.param("StableLmForCausalLM"),
78
+ pytest.param("Starcoder2ForCausalLM"),
79
pytest.param(
83
- "ehristoforu/Falcon3-MoE-2x7B-Insruct", # mixtral
80
+ "MixtralForCausalLM",
81
marks=[pytest.mark.cpu_model],
82
)
83
])
@@ -89,10 +86,12 @@ AITER_MODEL_LIST = [
86
@pytest.mark.parametrize("num_logprobs", [5])
87
@pytest.mark.parametrize(
88
"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,
90
dtype: str, max_tokens: int, num_logprobs: int,
91
use_rocm_aiter: bool, monkeypatch) -> None:
92
93
+ model = HF_EXAMPLE_MODELS.get_hf_info(model_arch).default
94
+
95
if model in REQUIRES_V0:
96
monkeypatch.setenv("VLLM_USE_V1", "0")
97
tests/models/registry.py
+2
-1
@@ -123,7 +123,8 @@ _TEXT_GENERATION_EXAMPLE_MODELS = {
123
"BambaForCausalLM": _HfExamplesInfo("ibm-ai-platform/Bamba-9B"),
124
"BloomForCausalLM": _HfExamplesInfo("bigscience/bloomz-1b1"),
125
"ChatGLMModel": _HfExamplesInfo("THUDM/chatglm3-6b",
126
- trust_remote_code=True),
126
+ trust_remote_code=True,
127
+ max_transformers_version="4.51.1"),
128
"ChatGLMForConditionalGeneration": _HfExamplesInfo("thu-coai/ShieldLM-6B-chatglm3", # noqa: E501
129
trust_remote_code=True),
130
"CohereForCausalLM": _HfExamplesInfo("CohereForAI/c4ai-command-r-v01",