Skip to content

[gg-rebased] perf(dspark): port adaptive draft capacity experiments - #126

Merged
lukealonso merged 4 commits into
local-inference-lab:dev/gilded-gnosis-rebasefrom
voipmonitor:codex/gg-rebased-dspark-capacity-20260718
Jul 18, 2026
Merged

[gg-rebased] perf(dspark): port adaptive draft capacity experiments#126
lukealonso merged 4 commits into
local-inference-lab:dev/gilded-gnosis-rebasefrom
voipmonitor:codex/gg-rebased-dspark-capacity-20260718

Conversation

@voipmonitor

Copy link
Copy Markdown

Summary

Port the remaining DSpark work from #109 onto dev/gilded-gnosis-rebase without restoring APIs removed by the upstream rebase.

The stack contains:

  • DSpark/DFlash correctness hardening for cache-restored prefixes, CUDA graph buffer lifetime, padded replay state, and stale draft-slot writes,
  • opt-in rowwise FP8 draft-head execution,
  • opt-in confidence/load-aware physical draft depth and compact varlen verification.

The performance experiments remain disabled by default.

Rebase notes

  • Preserved the rebased branch's MHC finalization and requires_non_causal attention configuration.
  • Kept the new explicit DeepSeek V4 decode threshold and breakable-CUDA-graph behavior.
  • Varlen SWA CUDA graph support is exposed only when adaptive capacity is explicitly enabled; default graph selection remains unchanged.
  • Did not resurrect the removed causal_cascade implementation. The old stack changed one generic attribute there, but the rebased runner no longer contains or imports that subsystem.
  • Removed a duplicate stale attn_vllm_config definition from the old experimental stack; it referenced the removed dflash_causal field.

This supersedes #109 for the rebased branch.

Validation

  • ruff check on all 57 changed Python files
  • ruff format --check on all 57 changed Python files
  • git diff --check
  • Python compileall on all changed Python files

Targeted unit tests and DSpark E2E/performance validation will run in the v19 image because the host checkout does not contain the vLLM runtime dependencies.

@coderabbitai

coderabbitai Bot commented Jul 18, 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: 49 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: c38e6f51-5edc-48ac-8fe6-21fbac54c317

📥 Commits

Reviewing files that changed from the base of the PR and between 533b037 and ee057bd.

📒 Files selected for processing (58)
  • benchmarks/profile_dspark_sps_curve.py
  • tests/engine/test_arg_utils.py
  • tests/evals/gsm8k/configs/DeepSeek-V4-Flash-DSpark-varlen-TP4.yaml
  • tests/test_config.py
  • tests/v1/attention/test_deepseek_v4_dspark_metadata.py
  • tests/v1/spec_decode/test_acceptance_length_controller.py
  • tests/v1/spec_decode/test_dflash_cudagraph_lifetime.py
  • tests/v1/spec_decode/test_dflash_prefix_cache_masking.py
  • tests/v1/spec_decode/test_dspark_fp8_draft_head.py
  • tests/v1/spec_decode/test_dynamic_sd_cug.py
  • tests/v1/worker/test_gpu_block_table.py
  • tests/v1/worker/test_gpu_model_runner_v2_draft_capacity.py
  • tests/v1/worker/test_gpu_sampling_states_seed.py
  • tests/v1/worker/test_mixed_warmup_gate.py
  • vllm/config/speculative.py
  • vllm/engine/arg_utils.py
  • vllm/envs.py
  • vllm/model_executor/layers/fp8_draft_head.py
  • vllm/model_executor/layers/sparse_attn_indexer.py
  • vllm/model_executor/models/qwen3_dspark.py
  • vllm/models/deepseek_v4/common/ops/cache_utils.py
  • vllm/models/deepseek_v4/nvidia/dspark.py
  • vllm/models/deepseek_v4/nvidia/flashinfer_sparse.py
  • vllm/models/deepseek_v4/sparse_mla.py
  • vllm/utils/deep_gemm.py
  • vllm/v1/attention/backend.py
  • vllm/v1/attention/backends/flashinfer.py
  • vllm/v1/attention/backends/mla/indexer.py
  • vllm/v1/attention/backends/mla/sparse_swa.py
  • vllm/v1/attention/backends/utils.py
  • vllm/v1/core/sched/async_scheduler.py
  • vllm/v1/core/sched/output.py
  • vllm/v1/core/sched/scheduler.py
  • vllm/v1/worker/gpu/attn_utils.py
  • vllm/v1/worker/gpu/block_table.py
  • vllm/v1/worker/gpu/cudagraph_utils.py
  • vllm/v1/worker/gpu/dp_utils.py
  • vllm/v1/worker/gpu/input_batch.py
  • vllm/v1/worker/gpu/model_runner.py
  • vllm/v1/worker/gpu/model_states/default.py
  • vllm/v1/worker/gpu/sample/bad_words.py
  • vllm/v1/worker/gpu/sample/gumbel.py
  • vllm/v1/worker/gpu/sample/sampler.py
  • vllm/v1/worker/gpu/sample/states.py
  • vllm/v1/worker/gpu/spec_decode/autoregressive/speculator.py
  • vllm/v1/worker/gpu/spec_decode/capacity.py
  • vllm/v1/worker/gpu/spec_decode/dflash/cudagraph.py
  • vllm/v1/worker/gpu/spec_decode/dflash/speculator.py
  • vllm/v1/worker/gpu/spec_decode/dspark/capacity.py
  • vllm/v1/worker/gpu/spec_decode/dspark/online_sts.py
  • vllm/v1/worker/gpu/spec_decode/dspark/speculator.py
  • vllm/v1/worker/gpu/spec_decode/dspark/utils.py
  • vllm/v1/worker/gpu/spec_decode/rejection_sampler.py
  • vllm/v1/worker/gpu/spec_decode/rejection_sampler_utils.py
  • vllm/v1/worker/gpu/spec_decode/speculator.py
  • vllm/v1/worker/gpu/states.py
  • vllm/v1/worker/gpu/warmup.py
  • vllm/v1/worker/ubatch_utils.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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