Clean up server args (#8161)

This commit is contained in:
Lianmin Zheng
2025-07-19 11:32:52 -07:00
committed by GitHub
parent 1b427dae02
commit bb0e8a32b5
8 changed files with 389 additions and 343 deletions

View File

@@ -56,14 +56,14 @@ def resolve_transformers_arch(model_config: ModelConfig, architectures: list[str
"if the model is custom)."
)
model_module = auto_modules["AutoModel"]
if model_config.impl == ModelImpl.TRANSFORMERS:
if model_config.model_impl == ModelImpl.TRANSFORMERS:
if not model_module.is_backend_compatible():
raise ValueError(
f"The Transformers implementation of {arch} is not "
"compatible with vLLM."
"compatible with SGLang."
)
architectures[i] = "TransformersForCausalLM"
if model_config.impl == ModelImpl.AUTO:
if model_config.model_impl == ModelImpl.AUTO:
if not model_module.is_backend_compatible():
raise ValueError(
f"{arch} has no SGlang implementation and the Transformers "
@@ -97,7 +97,7 @@ def get_model_architecture(model_config: ModelConfig) -> Tuple[Type[nn.Module],
supported_archs = ModelRegistry.get_supported_archs()
is_native_supported = any(arch in supported_archs for arch in architectures)
if not is_native_supported or model_config.impl == ModelImpl.TRANSFORMERS:
if not is_native_supported or model_config.model_impl == ModelImpl.TRANSFORMERS:
architectures = resolve_transformers_arch(model_config, architectures)
return ModelRegistry.resolve_model_cls(architectures)