fix(qwen3-ar): deterministic sampling seeds and trainer-state correctness#208
Draft
CjhHa1 wants to merge 3 commits into
Draft
fix(qwen3-ar): deterministic sampling seeds and trainer-state correctness#208CjhHa1 wants to merge 3 commits into
CjhHa1 wants to merge 3 commits into
Conversation
…ness Stabilize SGLang seeded sampling with BLAKE2b-derived per-sample seeds and driver-side sample_id validation before DP scatter. Fix optimizer_step tracking when W&B is disabled and scalar tensor checksum tracking when W&B is disabled and scalar tensor checksum crashes.
Remove documentation and test additions so the PR contains only the requested production changes.
Keep the pull request focused on runtime correctness fixes while preserving profiling work locally.
celve
requested changes
Jul 15, 2026
| enable_lora: false | ||
| # Keep production sampling on SGLang's fast default backend. The | ||
| # profiling launcher overrides this to true together with a fixed seed. | ||
| enable_deterministic_inference: false |
Collaborator
There was a problem hiding this comment.
I think we shouldn’t call this deterministic, since that usually implies batch‑invariant behavior.
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
sampling_seedfrom(base_seed, sample_id)via BLAKE2b so RNG assignment is stable across DP sharding, request reordering, and asynchronous completion; validate globally uniquesample_idsbefore rollout.optimizer_stepwhen telemetry is disabled, matching live logging semantics so checkpoint resume state remains correct.fingerprint_tensorby reshaping before the uint8 view.seed=Noneandenable_deterministic_inference: false.Validation