feat(weight-sync): add engine-group wave scheduling - #2351
Open
0z5a wants to merge 3 commits into
Open
Conversation
Bound concurrent rollout engine groups across NCCL, colocated tensor, disk reload, and quantized post-processing paths while preserving all-at-once behavior by default. Use per-engine communicators only for an active bound, coordinate deterministic waves across trainer ranks, and document the version-boundary guarantees. Assisted-by: OpenAI Codex Signed-off-by: jiachun <2609024259@qq.com>
Signed-off-by: 0z5a <dinadegttyarenko6@gmail.com>
0z5a
marked this pull request as ready for review
September 7, 2026 09:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft update — 2026-09-05
Includes the 2/4-scale follow-up and production wave-helper callsite validation. The callsite harness uses control-plane stubs; it is not a complete Ray/SGLang engine-load run. No production performance claim is made.
AI assistance: OpenAI Codex. Remains Draft; implementation, CPU/Gloo checks and production GPU validation are separate acceptance gates. No new GPU results were generated during publication.
The original submission description and validation history follow.
Summary
Motivation
Updating every rollout engine at once maximizes fan-out, but can create a short burst across GPU memory, PCIe/NVLink, network, or storage. A deployment should be able to cap that fan-out without hardware-specific sleeps and without assuming a particular rank count.
Semantics and compatibility
--update-weight-max-inflight-engine-groups Nadmits at mostNlogical SGLang engines at a time. An engine remains indivisible across its TP, PP, and multi-node workers. Admission follows stable engine order; for example, five engines at a limit of two form(0, 1),(2, 3),(4).The default is
0, preserving the existing all-at-once path and aggregate process-group topology. A value greater than or equal to the resolved engine count is also effectively unbounded. There are no world-size, rank-count, or six-rank special cases.Pause, flush, source-buffer reuse, and weight-version commit boundaries remain outside individual waves, so one completed wave does not resume serving early.
Validation
Correctness validation completed before publication:
1,2,4,5, and7)git diff --checkpassedPerformance validation is deliberately limited: event-order tests verify that active logical engine groups never exceed the configured bound, but no throughput or latency claim is made from synthetic tests. A real Ray/SGLang end-to-end run was not performed. Before merge, the option should be benchmarked on the target multi-engine topology against the default (
0), including weight-sync duration and rollout tail latency.Duplicate check
I searched current open issues and PRs for engine-group waves, staggered/bounded weight updates, in-flight engine scheduling, process groups, and the exact new option name. I found no substantive duplicate. #2331 is related but distinct: it orders pipeline process-group connect/disconnect, while this PR controls steady-state weight-transfer/reload admission.
AI assistance and required review
This implementation, tests, documentation, and PR text were prepared with OpenAI Codex assistance. A human contributor/maintainer must review every changed line, validate the design assumptions, and reproduce the relevant tests and deployment benchmark before this draft is considered ready to merge.