mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-28 12:07:04 +08:00
[Deprecation] Deprecate LLM.set_tokenizer (#26333)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
parent
5f7e8a916a
commit
d9836d4517
@ -9,7 +9,7 @@ import cloudpickle
|
|||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
from pydantic import ValidationError
|
from pydantic import ValidationError
|
||||||
from tqdm.auto import tqdm
|
from tqdm.auto import tqdm
|
||||||
from typing_extensions import TypeVar
|
from typing_extensions import TypeVar, deprecated
|
||||||
|
|
||||||
from vllm.beam_search import (
|
from vllm.beam_search import (
|
||||||
BeamSearchInstance,
|
BeamSearchInstance,
|
||||||
@ -354,6 +354,7 @@ class LLM:
|
|||||||
def get_tokenizer(self) -> AnyTokenizer:
|
def get_tokenizer(self) -> AnyTokenizer:
|
||||||
return self.llm_engine.get_tokenizer()
|
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:
|
def set_tokenizer(self, tokenizer: AnyTokenizer) -> None:
|
||||||
# While CachedTokenizer is dynamic, have no choice but
|
# While CachedTokenizer is dynamic, have no choice but
|
||||||
# compare class name. Misjudgment will arise from
|
# compare class name. Misjudgment will arise from
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user