Support weight loading without mmap (#7469)
This commit is contained in:
@@ -237,6 +237,7 @@ class ServerArgs:
|
||||
|
||||
# For model weight update
|
||||
custom_weight_loader: Optional[List[str]] = None
|
||||
weight_loader_disable_mmap: bool = False
|
||||
|
||||
def __post_init__(self):
|
||||
# Expert parallelism
|
||||
@@ -1599,6 +1600,11 @@ class ServerArgs:
|
||||
default=None,
|
||||
help="The custom dataloader which used to update the model. Should be set with a valid import path, such as my_package.weight_load_func",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--weight-loader-disable-mmap",
|
||||
action="store_true",
|
||||
help="Disable mmap while loading weight using safetensors.",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_cli_args(cls, args: argparse.Namespace):
|
||||
|
||||
Reference in New Issue
Block a user