This commit is contained in:
weedge 2026-01-13 03:17:29 -08:00 committed by GitHub
commit d2e1d04661
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2985,9 +2985,15 @@ class TorchLlmArgs(BaseLlmArgs):
def convert_load_format(cls, v):
if isinstance(v, LoadFormat):
return v
load_format = v.upper()
if load_format not in LoadFormat.__members__:
raise ValueError(f"Invalid LoadFormat: {v}")
if isinstance(v, int):
return LoadFormat(v)
load_format = "AUTO"
if isinstance(v, str):
load_format = v.upper()
if load_format not in LoadFormat.__members__:
raise ValueError(f"Invalid LoadFormat: {v}")
return LoadFormat[load_format]
# Extra resource managers to use in addition to the KV cache manager.