-
Notifications
You must be signed in to change notification settings - Fork 577
fix: complete deterministic rollout samplingPyq/complete determinism concurrent rollout #1607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -222,6 +222,10 @@ class GenerationHyperparameters: | |
| ) | ||
| }, | ||
| ) | ||
| seed: int | None = field( | ||
| default=None, | ||
| metadata={"help": "Per-request sampling seed sent to the inference backend."}, | ||
| ) | ||
| lora_name: str = field( | ||
| default="default_lora", | ||
| metadata={"help": "Lora name to be used for this generation."}, | ||
|
|
@@ -2098,6 +2102,7 @@ class SGLangConfig: | |
| enable_memory_saver: bool = False | ||
| allow_auto_truncate: bool = False | ||
| attention_backend: str | None = "fa3" | ||
| enable_deterministic_inference: bool = False | ||
| enable_multimodal: bool = False | ||
| sampling_backend: str | None = None | ||
| context_length: int | None = 32768 | ||
|
|
@@ -2415,6 +2420,22 @@ class InferenceEngineConfig: | |
| "help": "Whether to output verbose tracing messages for each generation request." | ||
| }, | ||
| ) | ||
| deterministic_sampling: bool = field( | ||
| default=False, | ||
| metadata={ | ||
|
Comment on lines
+2423
to
+2425
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you clarify the determinism contract for If asynchronous staleness is supported, how does this implementation guarantee If end-to-end determinism is only supported with |
||
| "help": "Use stable OpenAI-proxy request seeds and canonical group " | ||
| "and batch ordering. Concurrent SGLang generation also requires " | ||
| "sglang.enable_deterministic_inference." | ||
| }, | ||
| ) | ||
| serialize_group_samples: bool = field( | ||
| default=False, | ||
| metadata={ | ||
| "help": "Run RolloutControllerV2 samples within each group sequentially " | ||
| "instead of concurrently. This stabilizes SGLang batching for strict " | ||
| "reproducibility at the cost of rollout throughput." | ||
| }, | ||
| ) | ||
| check_trajectory_format: bool = field( | ||
| default=False, | ||
| metadata={ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGLang documents deterministic inference support only for the flashinfer, fa3,
and triton attention backends. At the moment enable_deterministic_inference is
forwarded for any configured backend, which can give users a false
determinism guarantee.
Could we emit a warning when deterministic inference is enabled with an
explicit attention_backend outside {flashinfer, fa3, triton}? None can remain
allowed because it delegates to the SGLang default.