Skip to content

Commit 2f5c14d

Browse files
authored
add clear messages for deprecated models (#21424)
Signed-off-by: youkaichao <[email protected]>
1 parent f002e9a commit 2f5c14d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

vllm/model_executor/model_loader/utils.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
as_reward_model,
2626
as_seq_cls_model)
2727
from vllm.model_executor.models.interfaces import SupportsQuant
28-
from vllm.model_executor.models.registry import _TRANSFORMERS_MODELS
28+
from vllm.model_executor.models.registry import (_PREVIOUSLY_SUPPORTED_MODELS,
29+
_TRANSFORMERS_MODELS)
2930
from vllm.utils import is_pin_memory_available
3031

3132
logger = init_logger(__name__)
@@ -261,6 +262,14 @@ def get_model_architecture(
261262
vllm_not_supported = False
262263
break
263264

265+
if any(arch in _PREVIOUSLY_SUPPORTED_MODELS for arch in architectures):
266+
previous_version = _PREVIOUSLY_SUPPORTED_MODELS[architectures[0]]
267+
raise ValueError(
268+
f"Model architecture {architectures[0]} was supported"
269+
f" in vLLM until version {previous_version}, and is "
270+
"not supported anymore. Please use an older version"
271+
" of vLLM if you want to use this model architecture.")
272+
264273
if (model_config.model_impl == ModelImpl.TRANSFORMERS or
265274
model_config.model_impl == ModelImpl.AUTO and vllm_not_supported):
266275
architectures = resolve_transformers_arch(model_config, architectures)

vllm/model_executor/models/registry.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@
276276
sys.executable, "-m", "vllm.model_executor.models.registry"
277277
]
278278

279+
_PREVIOUSLY_SUPPORTED_MODELS = {"Phi3SmallForCausalLM": "0.9.2"}
280+
279281

280282
@dataclass(frozen=True)
281283
class _ModelInfo:

0 commit comments

Comments
 (0)