[feature] Add HSDP pre-sharded option (#7948)

Signed-off-by: Maciej Bala <mbala@nvidia.com>
Co-authored-by: 汪志鹏 <wangzhipeng628@gmail.com>
This commit is contained in:
MaciejBalaNVand汪志鹏 authored and GitHub committed 2026-10-02 09:35:09 +00:00
1 parent b742f86136
commit 97d6c693a6
17 files changed
+1370 -87

No files matched your search

+7
View File
@@ -983,6 +983,9 @@ class OmniDiffusionConfig:
enable_broadcast_weight_load: bool = False
num_weight_load_threads: int = 4
# Shard meta parameters before reading rank-local HF safetensors slices.
hsdp_weight_load_strategy: str = "full"
# Enable sleep mode
enable_sleep_mode: bool = False
@@ -1196,6 +1199,10 @@ class OmniDiffusionConfig:
)
def __post_init__(self):
if self.hsdp_weight_load_strategy not in {"full", "pre_sharded"}:
raise ValueError(
f"hsdp_weight_load_strategy must be 'full' or 'pre_sharded', got {self.hsdp_weight_load_strategy!r}"
)
from vllm_omni.diffusion.offloader.config import (
OffloadStrategy,
materialize_legacy_offload_flags,