perf(spec-decode): bound autoregressive draft prefill graph memory - #502
Merged
lukealonso merged 3 commits intoAug 29, 2026
Conversation
Add an opt-in piecewise-only graph mode for autoregressive draft prefill while retaining full CUDA graphs for target and draft decode. Co-authored-by: OpenAI Codex <codex@openai.com> (cherry picked from commit 0f335be)
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe autoregressive speculator now selects sparse full-prefill CUDA graph capture sizes. ChangesAutoregressive CUDA graph capture
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
lukealonso
reviewed
Aug 29, 2026
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
lukealonso
marked this pull request as ready for review
August 29, 2026 02:58
lukealonso
merged commit Aug 29, 2026
766acf0
into
local-inference-lab:dev/jovian-judgement
1 of 3 checks passed
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.
Purpose
Bound autoregressive draft-prefill CUDA-graph memory while retaining FULL replay for common decode request capacities. The draft-position-0 manager now captures a sparse power-of-two request ladder and leaves PIECEWISE available for non-uniform prefill shapes.
For MTP5 with
max_num_seqs=32, the selected request capacities are1, 2, 4, 8, 16, 32, corresponding to token capacities6, 12, 24, 48, 96, 192. Candidate construction excludes every other FULL descriptor, so runtime dispatch cannot select a graph that was not captured.Why this is separate
This PR is focused on the autoregressive speculator's graph-capture policy. It does not duplicate the GLM kernel work in #495, #496, or #498, nor the CKV/DCP changes in #488. PR #503 was an aggregate reproduction snapshot and was closed as a duplicate; this surviving PR contains only the generally useful graph-memory change.
Duplicate searches found no local-inference-lab PR implementing a sparse FULL ladder for this manager. Upstream vllm-project#43776 disables full EAGLE prefill graphs for live multimodal batches; it addresses multimodal correctness rather than bounded capture selection for autoregressive draft prefill.
Validation
Source checks:
uvx ruff checkon all touched Python files: passed.uvx ruff formaton all touched Python files: passed.git diff --check: passed.2 passed, 24 deselected.Runtime qualification used the reviewed sparse-FULL policy on 4x RTX PRO 6000 Blackwell at stock clocks with GLM-5.3-Flash-NVFP4, TP4, DCP4, MTP5, FP8 KV, B12X attention, Humming MoE, B12X linear, C32/B4096/524k, and FULL+PIECEWISE graphs.
27 PIECEWISE + 25 FULL; MTP prefill27 PIECEWISE + 6 FULL; MTP decode7 FULL.29, 29, 29, 27, 30, averaging 28.8/30; 144/150 pass, zero errors, zero max-token truncations.The reproducible community derivative is published at
ghcr.io/jackzampolin/glm53-flash-nvfp4-jovian@sha256:8defdcb4a8b282ae9d5889e098cda289c09cdce67da006612df37fb858b0aa7b. Its release integration commita66b522873907084f6240e8866a1d681c749b4dbis the previously qualified production lineage plus commits patch-equivalent to this PR head.Review disclosure
OpenAI Codex assisted with implementation, tests, runtime qualification, and PR preparation. This remains a draft until Jack or another maintainer reviews every changed line and can defend the behavior end-to-end.
Summary by CodeRabbit
Performance Improvements
Tests