Skip to content

fix(spec decode): isolate probabilistic draft Gumbel streams - #98

Merged
lukealonso merged 2 commits into
dev/fathomless-firmamentfrom
codex/ff-spec-draft-gumbel-independent-20260717
Jul 17, 2026
Merged

fix(spec decode): isolate probabilistic draft Gumbel streams#98
lukealonso merged 2 commits into
dev/fathomless-firmamentfrom
codex/ff-spec-draft-gumbel-independent-20260717

Conversation

@voipmonitor

Copy link
Copy Markdown

Problem

Probabilistic speculative decoders reused the global CUDA RNG stream for Gumbel sampling. RNG consumption elsewhere in the model could therefore change draft decisions, and TP ranks could consume non-equivalent streams.

Fix

Add a dedicated per-device generator for Gumbel noise and use it consistently in the base, DFlash, and DSpark speculators. The generator is seeded deterministically from the vLLM seed while remaining independent from unrelated model RNG consumption.

This is the clean current-FF replacement for the RNG portions previously buried in #88.

Validation

  • python -m pytest -q tests/v1/worker/test_gpu_rejection_sampler_dist.py
  • Result: 1 passed on SM120
  • ruff check and ruff format --check on all changed Python files
  • git diff --check

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@voipmonitor, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eefbd5a2-5dad-4394-a23e-1942b55f9d3c

📥 Commits

Reviewing files that changed from the base of the PR and between e4879e1 and 4daad30.

📒 Files selected for processing (6)
  • tests/v1/worker/test_gpu_rejection_sampler_dist.py
  • vllm/v1/worker/gpu/sample/gumbel.py
  • vllm/v1/worker/gpu/spec_decode/dflash/speculator.py
  • vllm/v1/worker/gpu/spec_decode/dspark/speculator.py
  • vllm/v1/worker/gpu/spec_decode/speculator.py
  • vllm/v1/worker/gpu/spec_decode/utils.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/ff-spec-draft-gumbel-independent-20260717

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants