File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -113,12 +113,10 @@ async def wait_to_model_ready(self):
113113 ]
114114 self .rpc_event = multiprocessing .Event ()
115115 self .rpc_finished_event = multiprocessing .Event ()
116-
116+
117117 assert (self .world_size % self .nnodes ) == 0
118118 node_world_size = self .world_size // self .nnodes
119- for rank_id in range (
120- self .node_rank * node_world_size , (self .node_rank + 1 ) * node_world_size )
121- ):
119+ for rank_id in range (self .node_rank * node_world_size , (self .node_rank + 1 ) * node_world_size ):
122120 rpc_model = await start_model_process (
123121 args = self .args ,
124122 rank = rank_id ,
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ async def start_model_process(
306306 import lightllm .utils .rpyc_fix_utils as _
307307
308308 # 单卡时不使用 rpc
309- if node_world_size == 1 :
309+ if node_world_size == 1 and args . nnodes == 1 :
310310 return ModelRpcServer (
311311 args ,
312312 rank ,
You can’t perform that action at this time.
0 commit comments