fix: make rollout sampling deterministic - #1625
Merged
sitabulaixizawaluduo merged 1 commit intoAug 21, 2026
Merged
Conversation
pyq623
requested review from
HwVanICI,
TaoZex,
fishcrap,
garrett4wade,
geshi001,
guozhihao-224,
nuzant,
rchardx and
sitabulaixizawaluduo
as code owners
August 21, 2026 08:01
This was referenced Aug 21, 2026
sitabulaixizawaluduo
temporarily deployed
to
AReaL-unittests
August 21, 2026 08:24 — with
GitHub Actions
Inactive
sitabulaixizawaluduo
temporarily deployed
to
AReaL-unittests
August 21, 2026 08:24 — with
GitHub Actions
Inactive
sitabulaixizawaluduo
deleted the
pyq/deterministic-rollout-review-fixes
branch
August 21, 2026 14:29
15 tasks
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.
Summary
Supersedes #1607 with the deterministic-rollout changes rebased onto current
mainand separated from the independent dispatcher-correctness work requested during review.This PR propagates stable per-request sampling seeds through the V1 and V2 inference paths, preserves stable grouped-sample identity and result ordering, and documents the limits of the determinism contract. All behavior remains opt-in.
Determinism contract
rollout.deterministic_samplingdefaults tofalse.gconfig.seedoreval_gconfig.seed, because that would assign the same seed to every sample. Leave it unset to derive stable per-sample seeds, or usen_samples=1.max_head_offpolicyness=0; enabling deterministic sampling with asynchronous staleness emits a warning.{flashinfer, fa3, triton}emits a warning when that mode is enabled;Noneremains allowed so SGLang can choose its default.serialize_group_samplesguarantees only stable member submission order within each V2 group. It does not serialize requests across groups or claim to stabilize global dynamic-batch composition.Changes
GenerationHyperparameters.seedand forward it through OpenAI-compatible requests to vLLM and SGLang, including V2sampling_seed.deterministic_samplingexplicitly throughDataProxyConfigand its startup command.The callback registration, task-ID reservation/rollback, dynamic-batch accounting, shutdown, and concurrent-waiter changes discussed on #1607 are intentionally excluded and have moved to the separate dispatcher-correctness PR #1626.
Testing
Executed in the project Slurm development image:
The focused suite covers deterministic seed derivation and forwarding, request-index concurrency, explicit-seed precedence, shared grouped-seed validation, SGLang backend warnings, off-policy contract warnings, deterministic completed-result ordering, V2 Data Proxy propagation, and serial/concurrent group behavior.