Check the topology identities where the layout is written, and build at the published widths (#40340)

This commit is contained in:
Cheng Wan
2026-09-21 12:22:59 -07:00
committed by GitHub
parent d5fdab7022
commit 2d0e94e3a3
43 changed files with 843 additions and 261 deletions
@@ -21,6 +21,7 @@ from sglang.srt.distributed.parallel_state import (
initialize_model_parallel,
)
from sglang.srt.model_loader.loader import get_model_loader
from sglang.test.test_utils import publish_build_topology
def _validate_export(export_dir: str) -> bool:
@@ -113,10 +114,8 @@ def quantize_and_export_model(
local_rank=0,
backend="nccl" if device == "cuda" else "gloo",
)
initialize_model_parallel(
tensor_model_parallel_size=1,
pipeline_model_parallel_size=1,
)
publish_build_topology()
initialize_model_parallel()
# Configure model loading with ModelOpt quantization and export
model_config = ModelConfig(