[Chore] Remove SupportsV0Only interface and update supported models docs (#26783)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@ -8,14 +8,12 @@ from .interfaces import (
|
||||
SupportsMultiModal,
|
||||
SupportsPP,
|
||||
SupportsTranscription,
|
||||
SupportsV0Only,
|
||||
has_inner_state,
|
||||
supports_lora,
|
||||
supports_mrope,
|
||||
supports_multimodal,
|
||||
supports_pp,
|
||||
supports_transcription,
|
||||
supports_v0_only,
|
||||
)
|
||||
from .interfaces_base import (
|
||||
VllmModelForPooling,
|
||||
@ -43,6 +41,4 @@ __all__ = [
|
||||
"supports_pp",
|
||||
"SupportsTranscription",
|
||||
"supports_transcription",
|
||||
"SupportsV0Only",
|
||||
"supports_v0_only",
|
||||
]
|
||||
|
||||
@ -877,27 +877,6 @@ def supports_transcription(
|
||||
return getattr(model, "supports_transcription", False)
|
||||
|
||||
|
||||
@runtime_checkable
|
||||
class SupportsV0Only(Protocol):
|
||||
"""Models with this interface are not compatible with V1 vLLM."""
|
||||
|
||||
supports_v0_only: ClassVar[Literal[True]] = True
|
||||
|
||||
|
||||
@overload
|
||||
def supports_v0_only(model: type[object]) -> TypeIs[type[SupportsV0Only]]: ...
|
||||
|
||||
|
||||
@overload
|
||||
def supports_v0_only(model: object) -> TypeIs[SupportsV0Only]: ...
|
||||
|
||||
|
||||
def supports_v0_only(
|
||||
model: type[object] | object,
|
||||
) -> TypeIs[type[SupportsV0Only]] | TypeIs[SupportsV0Only]:
|
||||
return getattr(model, "supports_v0_only", False)
|
||||
|
||||
|
||||
@runtime_checkable
|
||||
class SupportsEagle3(Protocol):
|
||||
"""The interface required for models that support
|
||||
|
||||
@ -44,7 +44,6 @@ from .interfaces import (
|
||||
supports_multimodal_raw_input_only,
|
||||
supports_pp,
|
||||
supports_transcription,
|
||||
supports_v0_only,
|
||||
)
|
||||
from .interfaces_base import (
|
||||
get_default_pooling_type,
|
||||
@ -479,7 +478,6 @@ class _ModelInfo:
|
||||
has_noops: bool
|
||||
supports_transcription: bool
|
||||
supports_transcription_only: bool
|
||||
supports_v0_only: bool
|
||||
|
||||
@staticmethod
|
||||
def from_model_cls(model: type[nn.Module]) -> "_ModelInfo":
|
||||
@ -504,7 +502,6 @@ class _ModelInfo:
|
||||
supports_transcription_only=(
|
||||
supports_transcription(model) and model.supports_transcription_only
|
||||
),
|
||||
supports_v0_only=supports_v0_only(model),
|
||||
has_noops=has_noops(model),
|
||||
)
|
||||
|
||||
@ -1063,14 +1060,6 @@ class _ModelRegistry:
|
||||
model_cls, _ = self.inspect_model_cls(architectures, model_config)
|
||||
return model_cls.supports_transcription_only
|
||||
|
||||
def is_v1_compatible(
|
||||
self,
|
||||
architectures: str | list[str],
|
||||
model_config: ModelConfig,
|
||||
) -> bool:
|
||||
model_cls, _ = self.inspect_model_cls(architectures, model_config)
|
||||
return not model_cls.supports_v0_only
|
||||
|
||||
|
||||
ModelRegistry = _ModelRegistry(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user