[Feature] Support HSDP for diffusion models (#1339)
Signed-off-by: gcanlin <canlinguosdu@gmail.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
66c3e04263
commit
f53152d340
17 files changed
+1023
-46
No files matched your search
@@ -210,6 +210,27 @@ class OmniServeCommand(CLISubcommand):
|
||||
"Equivalent to setting DiffusionParallelConfig.ring_degree.",
|
||||
)
|
||||
|
||||
# HSDP (Hybrid Sharded Data Parallel) parameters
|
||||
omni_config_group.add_argument(
|
||||
"--use-hsdp",
|
||||
dest="use_hsdp",
|
||||
action="store_true",
|
||||
help="Enable HSDP (Hybrid Sharded Data Parallel) for diffusion models. "
|
||||
"Shards model weights across GPUs to reduce per-GPU memory usage.",
|
||||
)
|
||||
omni_config_group.add_argument(
|
||||
"--hsdp-shard-size",
|
||||
type=int,
|
||||
default=-1,
|
||||
help="Number of GPUs to shard weights across. -1 = auto (world_size / replicate_size).",
|
||||
)
|
||||
omni_config_group.add_argument(
|
||||
"--hsdp-replicate-size",
|
||||
type=int,
|
||||
default=1,
|
||||
help="Number of replica groups for HSDP. Each group holds a full sharded copy.",
|
||||
)
|
||||
|
||||
# Cache optimization parameters
|
||||
omni_config_group.add_argument(
|
||||
"--cache-backend",
|
||||
|
||||
Reference in new issue
Block a user