mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-06-03 04:17:52 +08:00
[Bugfix][V1] Avoid importing PreTrainedModel (#15366)
Signed-off-by: Hollow Man <hollowman@opensuse.org>
This commit is contained in:
parent
5797fb97e9
commit
948ab03e7e
@ -32,7 +32,7 @@ def set_default_torch_dtype(dtype: torch.dtype):
|
|||||||
|
|
||||||
def is_transformers_impl_compatible(
|
def is_transformers_impl_compatible(
|
||||||
arch: str,
|
arch: str,
|
||||||
module: Optional[transformers.PreTrainedModel] = None) -> bool:
|
module: Optional["transformers.PreTrainedModel"] = None) -> bool:
|
||||||
mod = module or getattr(transformers, arch, None)
|
mod = module or getattr(transformers, arch, None)
|
||||||
if mod is None:
|
if mod is None:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user