From 2676ab1e0b93c3d75829119fdc5bbdbc1b8193f0 Mon Sep 17 00:00:00 2001 From: Cyrus Leung Date: Fri, 15 May 2026 15:13:32 +0800 Subject: [PATCH] [Deprecation] Remove old locations of `get_tokenizer` and `resolve_hf_chat_template` (#35024) Signed-off-by: DarkLight1337 --- .../run-lm-eval-chartqa-vllm-vlm-baseline.sh | 2 +- .../run-lm-eval-gsm-hf-baseline.sh | 2 +- .../run-lm-eval-gsm-vllm-baseline.sh | 2 +- .../run-lm-eval-mmlupro-vllm-baseline.sh | 2 +- .../hardware_ci/run-tpu-v1-test-part2.sh | 2 +- .../scripts/hardware_ci/run-tpu-v1-test.sh | 2 +- docs/features/quantization/fp8.md | 2 +- docs/features/quantization/int4.md | 2 +- docs/features/quantization/int8.md | 2 +- docs/features/quantization/quark.md | 2 +- requirements/test/cuda.in | 2 +- requirements/test/cuda.txt | 7 +------ requirements/test/nightly-torch.txt | 2 +- requirements/test/rocm.in | 2 +- requirements/test/rocm.txt | 7 +------ vllm/entrypoints/chat_utils.py | 18 ---------------- vllm/transformers_utils/tokenizer.py | 21 ------------------- 17 files changed, 15 insertions(+), 64 deletions(-) delete mode 100644 vllm/transformers_utils/tokenizer.py diff --git a/.buildkite/lm-eval-harness/run-lm-eval-chartqa-vllm-vlm-baseline.sh b/.buildkite/lm-eval-harness/run-lm-eval-chartqa-vllm-vlm-baseline.sh index 518af9a6601..b495c0d123a 100755 --- a/.buildkite/lm-eval-harness/run-lm-eval-chartqa-vllm-vlm-baseline.sh +++ b/.buildkite/lm-eval-harness/run-lm-eval-chartqa-vllm-vlm-baseline.sh @@ -2,7 +2,7 @@ # We can use this script to compute baseline accuracy on chartqa for vllm. # # Make sure you have lm-eval-harness installed: -# pip install "lm-eval[api]>=0.4.11" +# pip install "lm-eval[api]>=0.4.12" usage() { echo`` diff --git a/.buildkite/lm-eval-harness/run-lm-eval-gsm-hf-baseline.sh b/.buildkite/lm-eval-harness/run-lm-eval-gsm-hf-baseline.sh index f010ffe6752..e430e6183b2 100755 --- a/.buildkite/lm-eval-harness/run-lm-eval-gsm-hf-baseline.sh +++ b/.buildkite/lm-eval-harness/run-lm-eval-gsm-hf-baseline.sh @@ -2,7 +2,7 @@ # We can use this script to compute baseline accuracy on GSM for transformers. # # Make sure you have lm-eval-harness installed: -# pip install "lm-eval[api]>=0.4.11" +# pip install "lm-eval[api]>=0.4.12" usage() { echo`` diff --git a/.buildkite/lm-eval-harness/run-lm-eval-gsm-vllm-baseline.sh b/.buildkite/lm-eval-harness/run-lm-eval-gsm-vllm-baseline.sh index fec4a94e63e..f1a541ddbef 100644 --- a/.buildkite/lm-eval-harness/run-lm-eval-gsm-vllm-baseline.sh +++ b/.buildkite/lm-eval-harness/run-lm-eval-gsm-vllm-baseline.sh @@ -3,7 +3,7 @@ # We use this for fp8, which HF does not support. # # Make sure you have lm-eval-harness installed: -# pip install "lm-eval[api]>=0.4.11" +# pip install "lm-eval[api]>=0.4.12" usage() { echo`` diff --git a/.buildkite/lm-eval-harness/run-lm-eval-mmlupro-vllm-baseline.sh b/.buildkite/lm-eval-harness/run-lm-eval-mmlupro-vllm-baseline.sh index e3c6e16bd6b..ba8da9fc3f5 100644 --- a/.buildkite/lm-eval-harness/run-lm-eval-mmlupro-vllm-baseline.sh +++ b/.buildkite/lm-eval-harness/run-lm-eval-mmlupro-vllm-baseline.sh @@ -3,7 +3,7 @@ # We use this for fp8, which HF does not support. # # Make sure you have lm-eval-harness installed: -# pip install "lm-eval[api]>=0.4.11" +# pip install "lm-eval[api]>=0.4.12" usage() { echo`` diff --git a/.buildkite/scripts/hardware_ci/run-tpu-v1-test-part2.sh b/.buildkite/scripts/hardware_ci/run-tpu-v1-test-part2.sh index 1def2c4682b..f300b7f8099 100755 --- a/.buildkite/scripts/hardware_ci/run-tpu-v1-test-part2.sh +++ b/.buildkite/scripts/hardware_ci/run-tpu-v1-test-part2.sh @@ -61,7 +61,7 @@ echo "Results will be stored in: $RESULTS_DIR" echo "--- Installing Python dependencies ---" python3 -m pip install --progress-bar off git+https://github.com/thuml/depyf.git \ && python3 -m pip install --progress-bar off pytest pytest-asyncio tpu-info \ - && python3 -m pip install --progress-bar off "lm-eval[api]>=0.4.11" \ + && python3 -m pip install --progress-bar off "lm-eval[api]>=0.4.12" \ && python3 -m pip install --progress-bar off hf-transfer tblib==3.1.0 echo "--- Python dependencies installed ---" diff --git a/.buildkite/scripts/hardware_ci/run-tpu-v1-test.sh b/.buildkite/scripts/hardware_ci/run-tpu-v1-test.sh index 61ebddf82e4..6f4e0d37db7 100755 --- a/.buildkite/scripts/hardware_ci/run-tpu-v1-test.sh +++ b/.buildkite/scripts/hardware_ci/run-tpu-v1-test.sh @@ -61,7 +61,7 @@ echo "Results will be stored in: $RESULTS_DIR" echo "--- Installing Python dependencies ---" python3 -m pip install --progress-bar off git+https://github.com/thuml/depyf.git \ && python3 -m pip install --progress-bar off pytest pytest-asyncio tpu-info \ - && python3 -m pip install --progress-bar off "lm-eval[api]>=0.4.11" \ + && python3 -m pip install --progress-bar off "lm-eval[api]>=0.4.12" \ && python3 -m pip install --progress-bar off hf-transfer tblib==3.1.0 echo "--- Python dependencies installed ---" diff --git a/docs/features/quantization/fp8.md b/docs/features/quantization/fp8.md index 2165161ce89..2de71ce8da1 100644 --- a/docs/features/quantization/fp8.md +++ b/docs/features/quantization/fp8.md @@ -84,7 +84,7 @@ Since simple RTN does not require data for weight quantization and the activatio Install `vllm` and `lm-evaluation-harness` for evaluation: ```bash -pip install vllm "lm-eval[api]>=0.4.11" +pip install vllm "lm-eval[api]>=0.4.12" ``` Load and run the model in `vllm`: diff --git a/docs/features/quantization/int4.md b/docs/features/quantization/int4.md index ed8a08a6aef..41c4b40574f 100644 --- a/docs/features/quantization/int4.md +++ b/docs/features/quantization/int4.md @@ -18,7 +18,7 @@ pip install llmcompressor Additionally, install `vllm` and `lm-evaluation-harness` for evaluation: ```bash -pip install vllm "lm-eval[api]>=0.4.11" +pip install vllm "lm-eval[api]>=0.4.12" ``` ## Quantization Process diff --git a/docs/features/quantization/int8.md b/docs/features/quantization/int8.md index 53a5e750660..547eb5aedc2 100644 --- a/docs/features/quantization/int8.md +++ b/docs/features/quantization/int8.md @@ -23,7 +23,7 @@ pip install llmcompressor Additionally, install `vllm` and `lm-evaluation-harness` for evaluation: ```bash -pip install vllm "lm-eval[api]>=0.4.11" +pip install vllm "lm-eval[api]>=0.4.12" ``` ## Quantization Process diff --git a/docs/features/quantization/quark.md b/docs/features/quantization/quark.md index 1961d73099a..8ed6b2ca60c 100644 --- a/docs/features/quantization/quark.md +++ b/docs/features/quantization/quark.md @@ -20,7 +20,7 @@ for more installation details. Additionally, install `vllm` and `lm-evaluation-harness` for evaluation: ```bash -pip install vllm "lm-eval[api]>=0.4.11" +pip install vllm "lm-eval[api]>=0.4.12" ``` ## Quantization Process diff --git a/requirements/test/cuda.in b/requirements/test/cuda.in index 71e496ccf65..1a71e3ee0e4 100644 --- a/requirements/test/cuda.in +++ b/requirements/test/cuda.in @@ -36,7 +36,7 @@ num2words # required for smolvlm test open_clip_torch==2.32.0 # Required for nemotron_vl test, Nemotron Parse in test_common.py opencv-python-headless >= 4.13.0 # required for video test datamodel_code_generator # required for minicpm3 test -lm-eval[api]>=0.4.11 # required for model evaluation test +lm-eval[api]>=0.4.12 # required for model evaluation test mteb[bm25s]>=2, <3 # required for mteb test transformers==5.5.3 tokenizers==0.22.2 diff --git a/requirements/test/cuda.txt b/requirements/test/cuda.txt index 8544f7b7096..290e539c9be 100644 --- a/requirements/test/cuda.txt +++ b/requirements/test/cuda.txt @@ -41,7 +41,6 @@ attrs==24.2.0 # via # aiohttp # hypothesis - # jsonlines # jsonschema # pytest-subtests # referencing @@ -357,8 +356,6 @@ joblib==1.4.2 # librosa # nltk # scikit-learn -jsonlines==4.0.0 - # via lm-eval jsonpointer==3.0.0 # via jsonschema jsonschema==4.23.0 @@ -387,7 +384,7 @@ librosa==0.10.2.post1 # via -r requirements/test/cuda.in llvmlite==0.47.0 # via numba -lm-eval==0.4.11 +lm-eval==0.4.12 # via -r requirements/test/cuda.in lxml==5.3.0 # via @@ -1141,5 +1138,3 @@ yarl==1.17.1 # schemathesis zipp==3.23.0 # via importlib-metadata -zstandard==0.23.0 - # via lm-eval diff --git a/requirements/test/nightly-torch.txt b/requirements/test/nightly-torch.txt index 75928e088da..9c70aa8b90e 100644 --- a/requirements/test/nightly-torch.txt +++ b/requirements/test/nightly-torch.txt @@ -27,7 +27,7 @@ mistral_common[image,audio] >= 1.11.2 # required for voxtral test num2words # required for smolvlm test opencv-python-headless >= 4.13.0 # required for video test datamodel_code_generator # required for minicpm3 test -lm-eval[api]>=0.4.11 # required for model evaluation test +lm-eval[api]>=0.4.12 # required for model evaluation test mteb[bm25s]>=2, <3 # required for mteb test transformers==5.5.3 tokenizers==0.22.2 diff --git a/requirements/test/rocm.in b/requirements/test/rocm.in index 105c9c3527d..812fb736b57 100644 --- a/requirements/test/rocm.in +++ b/requirements/test/rocm.in @@ -35,7 +35,7 @@ num2words # required for smolvlm test open_clip_torch==2.32.0 # Required for nemotron_vl test, Nemotron Parse in test_common.py opencv-python-headless>=4.13.0 # required for video test datamodel_code_generator # required for minicpm3 test -lm-eval[api]>=0.4.11 # required for model evaluation test +lm-eval[api]>=0.4.12 # required for model evaluation test mteb[bm25s]>=2, <3 # required for mteb test transformers==5.5.3 tokenizers==0.22.2 diff --git a/requirements/test/rocm.txt b/requirements/test/rocm.txt index dfd187555c5..4b801383d89 100644 --- a/requirements/test/rocm.txt +++ b/requirements/test/rocm.txt @@ -55,7 +55,6 @@ astor==0.8.1 attrs==26.1.0 # via # aiohttp - # jsonlines # jsonschema # pytest-subtests # referencing @@ -433,8 +432,6 @@ joblib==1.5.3 # librosa # nltk # scikit-learn -jsonlines==4.0.0 - # via lm-eval jsonpointer==3.1.0 # via jsonschema jsonschema==4.26.0 @@ -472,7 +469,7 @@ llguidance==1.7.5 # -r requirements/test/../common.txt llvmlite==0.47.0 # via numba -lm-eval==0.4.11 +lm-eval==0.4.12 # via -r requirements/test/rocm.in lm-format-enforcer==0.11.3 # via @@ -1362,8 +1359,6 @@ yarl==1.23.0 # schemathesis zipp==3.23.0 # via importlib-metadata -zstandard==0.25.0 - # via lm-eval # The following packages were excluded from the output: # torch diff --git a/vllm/entrypoints/chat_utils.py b/vllm/entrypoints/chat_utils.py index cfe0857b679..e3b727597d8 100644 --- a/vllm/entrypoints/chat_utils.py +++ b/vllm/entrypoints/chat_utils.py @@ -3,7 +3,6 @@ import asyncio import json -import warnings from abc import ABC, abstractmethod from collections import Counter, defaultdict from collections.abc import Awaitable, Callable, Iterable @@ -73,23 +72,6 @@ else: logger = init_logger(__name__) -def __getattr__(name: str): - if name == "resolve_hf_chat_template": - from vllm.renderers.hf import resolve_chat_template - - warnings.warn( - "`vllm.entrypoints.chat_utils.resolve_hf_chat_template` has been moved to " - "`vllm.renderers.hf.resolve_chat_template`. " - "The old name will be removed in v0.16.", - DeprecationWarning, - stacklevel=2, - ) - - return resolve_chat_template - - raise AttributeError(f"module {__name__!r} has no attribute {name!r}") - - class ChatTemplateResolutionError(ValueError): """Raised when chat template resolution fails. diff --git a/vllm/transformers_utils/tokenizer.py b/vllm/transformers_utils/tokenizer.py deleted file mode 100644 index 36e357a83da..00000000000 --- a/vllm/transformers_utils/tokenizer.py +++ /dev/null @@ -1,21 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: Copyright contributors to the vLLM project -import warnings - - -def __getattr__(name: str): - # Keep until lm-eval is updated - if name == "get_tokenizer": - from vllm.tokenizers import get_tokenizer - - warnings.warn( - "`vllm.transformers_utils.tokenizer.get_tokenizer` " - "has been moved to `vllm.tokenizers.get_tokenizer`. " - "The old name will be removed in a future version.", - DeprecationWarning, - stacklevel=2, - ) - - return get_tokenizer - - raise AttributeError(f"module {__name__!r} has no attribute {name!r}")