Weight sync refactor + move sparse nccl engine (#44353)

Signed-off-by: hao-aaron <ahao@anyscale.com>
Signed-off-by: haoaaron <ahao@anyscale.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Aaron Hao
2026-07-01 01:25:19 -07:00
committed by GitHub
co-authored by Claude Sonnet 4.6
parent f651a8a9a4
commit 77a9c5ae28
32 changed files with 951 additions and 1044 deletions
+2 -5
View File
@@ -873,12 +873,9 @@ class LLM(BeamSearchOfflineMixin, PoolingOfflineMixin, OfflineInferenceMixin):
"init_weight_transfer_engine", kwargs={"init_info": init_info_dict}
)
def start_weight_update(self, is_checkpoint_format: bool = True) -> None:
def start_weight_update(self) -> None:
"""Start a new weight update."""
self.llm_engine.collective_rpc(
"start_weight_update",
kwargs={"is_checkpoint_format": is_checkpoint_format},
)
self.llm_engine.collective_rpc("start_weight_update")
def update_weights(self, request: WeightTransferUpdateRequest | dict) -> None:
"""
@@ -129,14 +129,7 @@ async def init_weight_transfer_engine(raw_request: Request):
@router.post("/start_weight_update")
async def start_weight_update(raw_request: Request):
try:
body = await raw_request.json()
except json.JSONDecodeError as e:
raise HTTPException(status_code=400, detail="Invalid JSON format") from e # noqa: B904
is_checkpoint_format = body.get("is_checkpoint_format", True)
await engine_client(raw_request).start_weight_update(
is_checkpoint_format=is_checkpoint_format
)
await engine_client(raw_request).start_weight_update()
return JSONResponse(content={"message": "Weight update started"})