[feat] Add explicit /start_weight_update and /finish_weight_update APIs for weight transfer (#39212)
This commit is contained in:
@@ -1049,6 +1049,13 @@ class AsyncLLM(EngineClient):
|
||||
"init_weight_transfer_engine", kwargs={"init_info": init_info_dict}
|
||||
)
|
||||
|
||||
async def start_weight_update(self, is_checkpoint_format: bool = True) -> None:
|
||||
"""Start a new weight update."""
|
||||
await self.collective_rpc(
|
||||
"start_weight_update",
|
||||
kwargs={"is_checkpoint_format": is_checkpoint_format},
|
||||
)
|
||||
|
||||
async def update_weights(self, request: WeightTransferUpdateRequest) -> None:
|
||||
"""
|
||||
Batched weight update for RL training.
|
||||
@@ -1067,3 +1074,7 @@ class AsyncLLM(EngineClient):
|
||||
await self.collective_rpc(
|
||||
"update_weights", kwargs={"update_info": update_info_dict}
|
||||
)
|
||||
|
||||
async def finish_weight_update(self) -> None:
|
||||
"""Finish the current weight update."""
|
||||
await self.collective_rpc("finish_weight_update")
|
||||
|
||||
Reference in New Issue
Block a user