[sharded state loader] support pp in sharded state loader (#52110)

Signed-off-by: Andy Xie <andy.xning@gmail.com>
Co-authored-by: Simon Mo <simon.mo@hey.com>
This commit is contained in:
Ning Xie
2026-10-09 11:08:31 -07:00
committed by GitHub
co-authored by Simon Mo
parent c811943137
commit a0f28d73a8
4 changed files with 572 additions and 30 deletions
+5
View File
@@ -2444,6 +2444,11 @@ def get_tensor_model_parallel_rank() -> int:
return get_tp_group().rank_in_group
def get_pipeline_model_parallel_rank() -> int:
"""Return my rank for the pipeline model parallel group."""
return get_pp_group().rank_in_group
def get_node_count() -> int:
"""Return the total number of nodes in the distributed environment."""
assert _NODE_COUNT is not None, "distributed environment is not initialized"