Repository navigation
Conversation
Port of vllm-project/vllm's MRV2 DSparkSpeculator (vllm#46995 by @benchislett, speculator as of 2026-09-30) onto this fork's V2 DFlash speculator: anchor-as-first query block (SAMPLE_FROM_ANCHOR), sequential Markov sampling inside the drafter's FULL CUDA graph, DeepSeek-V4 context slots per cache layer, drafter-wide staging buffers, and the V1 proposer's weight contract (the drafter keeps its own embedding copy under PP). Admits method 'dspark' on MRV2, wires its aux target layers and noise token, and feeds drafters the target hidden state unless the target provides an override (DeepSeek-V4 MTP only). The layering baseline records the new speculator's references to the DFlash base it extends, as it does for the V1 proposer (vllm/v1/spec_decode/dspark.py). Co-authored-by: Benjamin Chislett <bchislett@nvidia.com> Signed-off-by: Peuqui <43776522+Peuqui@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJxVXkjSHhfq2D71DoYSK7
Capture DeepSeek-V4 decode graphs at the SM70 compressed-index context buckets as the V1 dispatcher does, with the capture metadata bounded by the bucket, and replay the smallest bucket that covers the live context. Without them the graphs were captured at the model's maximum length and the 35k-token decode step took 91-92 ms instead of 70 ms. The buckets come from the same SM70 graph plan the V1 dispatcher reads; the layering baseline accepts that one import. Signed-off-by: Peuqui <43776522+Peuqui@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJxVXkjSHhfq2D71DoYSK7
… buckets Context slots per cache layer, greedy Markov step mapping, dummy batches at a context bound, and the smallest-covering bucket selection; the long-attention graph fakes gain the new manager attribute. Signed-off-by: Peuqui <43776522+Peuqui@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJxVXkjSHhfq2D71DoYSK7
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
DeepSeek-V4 with its DSpark drafter runs only on Model Runner V1 in this fork: MRV2 rejects the speculative method 'dspark'. This PR adds it, in three commits.
The layering baseline records the one SM70 graph-plan import of the MRV2 graph manager and the new speculator's references to the DFlash base it extends, as it does for vllm/v1/spec_decode/dspark.py.
Not a duplicate: gh pr list --repo 1CatAI/1Cat-vLLM --state all --search "dspark", "MRV2", "model runner v2", "context bucket" and "compressed index graph" find no PR that adds DSpark or compressed-index buckets to MRV2; #874 added the buckets to the V1 dispatcher. Open PRs that touch the same files (#1182, #1184, #1197, #1215, #1217) change other things and merge without conflicts.
AI assistance was used for this change. I reviewed every line and ran the tests and measurements below.
Test Plan
Serving on our fork (main 6f3557c plus our commits): DeepSeek-V4-Flash MXFP4/FP8 with DSpark (num_speculative_tokens 5), PP5 over three Tesla V100 and two Quadro RTX 8000, FP8 KV cache, max_num_seqs 1. Arms: the same entry on V1 and with VLLM_USE_V2_MODEL_RUNNER=1 (cudagraph_capture_sizes [5, 6]); boots V2 cold, V1, V2, V1, V2. Per boot: three greedy reference prompts, four 35.7k-token prompts, short prose, code and a 1.9k-token edit task at production sampling, eight quality prompts.
Path coverage
Acceleration and benchmark contract (required for performance changes)
Test Result