fix(rollout): make dynamic refills granular - #2218
Open
EazyReal wants to merge 1 commit into
Open
Conversation
Allow any positive over_sampling_batch_size, and cancel unfinished non-partial generation tasks before draining SGLang so one rejected prompt group cannot launch a full replacement wave or keep the drain loop alive. Abort failures cancel remaining groups before re-raising. Co-authored-by: Cursor <cursoragent@cursor.com>
EazyReal
force-pushed
the
fix/granular-rollout-refills
branch
from
August 19, 2026 01:36
b106461 to
1d1a758
Compare
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.
Problem
Dynamic sampling currently requires
over_sampling_batch_sizeto be at leastrollout_batch_size, even though the rollout state machine supports any positive refill granularity. A single rejected prompt group can therefore launch a full replacement wave.At rollout completion, non-partial generation tasks are also left running while SGLang is drained. Multi-turn custom generation can issue new requests during that drain, delaying or preventing it from reaching idle.
Change
over_sampling_batch_sizeThe existing scheduler remains unchanged: rejected groups decrement accepted-plus-pending coverage, and the configured refill granularity restores it.
Validation
python tests/test_sglang_rollout_abort.py -q— 4 passedpython .github/workflows/generate_github_workflows.pypre-commit run --all-filesgit diff --checkNo live GPU or distributed rollout was run; the affected lifecycle boundaries are covered with CPU and mocked regressions.