[V1]SupportsV0Only protocol for model definitions (#13959)

Signed-off-by: Roger Wang <ywang@roblox.com>
This commit is contained in:
Roger Wang
2025-02-27 17:02:15 -08:00
committed by GitHub
parent 67fc426845
commit 6c85da3a18
19 changed files with 93 additions and 32 deletions

View File

@@ -1039,6 +1039,11 @@ class ModelConfig:
def runner_type(self) -> RunnerType:
return _TASK_RUNNER[self.task]
@property
def is_v1_compatible(self) -> bool:
architectures = getattr(self.hf_config, "architectures", [])
return ModelRegistry.is_v1_compatible(architectures)
class CacheConfig:
"""Configuration for the KV cache.