mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-13 22:18:36 +08:00
Merge 37ddad5ab9 into 38296a472b
This commit is contained in:
commit
d2e1d04661
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user