Support multi-thread model weight loading (#7277)

This commit is contained in:
xianzhiT
2025-06-25 01:39:10 +08:00
committed by GitHub
parent 8ecad0b16f
commit 9f1787fa60
4 changed files with 143 additions and 10 deletions

View File

@@ -47,6 +47,7 @@ class ServerArgs:
tokenizer_mode: str = "auto"
skip_tokenizer_init: bool = False
load_format: str = "auto"
model_loader_extra_config: str = "{}"
trust_remote_code: bool = False
dtype: str = "auto"
kv_cache_dtype: str = "auto"
@@ -632,6 +633,13 @@ class ServerArgs:
"layer before loading another to make the peak memory envelope "
"smaller.",
)
parser.add_argument(
"--model-loader-extra-config",
type=str,
help="Extra config for model loader. "
"This will be passed to the model loader corresponding to the chosen load_format.",
default=ServerArgs.model_loader_extra_config,
)
parser.add_argument(
"--trust-remote-code",
action="store_true",