From d9836d45177bc862a9abd0afac996e733cffd6aa Mon Sep 17 00:00:00 2001 From: Cyrus Leung Date: Tue, 7 Oct 2025 14:50:57 +0800 Subject: [PATCH] [Deprecation] Deprecate `LLM.set_tokenizer` (#26333) Signed-off-by: DarkLight1337 --- vllm/entrypoints/llm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vllm/entrypoints/llm.py b/vllm/entrypoints/llm.py index 9afbf8b7e1b85..b1a68c2163237 100644 --- a/vllm/entrypoints/llm.py +++ b/vllm/entrypoints/llm.py @@ -9,7 +9,7 @@ import cloudpickle import torch.nn as nn from pydantic import ValidationError from tqdm.auto import tqdm -from typing_extensions import TypeVar +from typing_extensions import TypeVar, deprecated from vllm.beam_search import ( BeamSearchInstance, @@ -354,6 +354,7 @@ class LLM: def get_tokenizer(self) -> AnyTokenizer: return self.llm_engine.get_tokenizer() + @deprecated("`set_tokenizer` is deprecated and will be removed in v0.13.") def set_tokenizer(self, tokenizer: AnyTokenizer) -> None: # While CachedTokenizer is dynamic, have no choice but # compare class name. Misjudgment will arise from