DeepSeek recently open-sourced DeepSpec, a codebase for training and evaluating speculative decoding draft models, along with the DSpark paper and checkpoints.
I wanted to understand what is actually new here, because speculative decoding itself is not new. The older idea is already powerful: use a small draft model to propose tokens, then let the large target model verify them. I explained that foundation in Speculative Decoding Explained.
DSpark is interesting because it attacks two practical problems that show up when speculative decoding moves from a paper idea into production serving:
- The draft block gets worse toward the tail.
- Verifying the whole draft block can waste target-model capacity under load.
The DSpark paper calls the first problem suffix decay. The second problem is a serving-system problem: under high concurrency, every extra verification token competes with other users.
DeepSeek’s answer is:
- a semi-autoregressive drafter that keeps most of the speed of parallel drafting while adding just enough local token dependency
- confidence-scheduled verification that verifies longer or shorter prefixes depending on estimated survival probability and current engine load
The reported production result is not just a toy benchmark. In DeepSeek-V4 serving, the paper reports 60%-85% faster per-user generation for V4-Flash and 57%-78% faster per-user generation for V4-Pro at matched practical throughput levels.

What DeepSpec and DSpark Are
The DeepSpec repository is a full-stack training and evaluation codebase for speculative decoding draft models. It includes data preparation, draft model implementations, training code, evaluation scripts, and released checkpoints for multiple target models.
The repository currently includes three draft algorithms:
- Eagle3, an autoregressive drafter
- DFlash, a parallel drafter
- DSpark, DeepSeek’s semi-autoregressive and confidence-scheduled method
The Hugging Face page for DeepSeek-V4-Pro-DSpark makes one detail explicit: DeepSeek-V4-Pro-DSpark is not a new base model. It is the same DeepSeek-V4-Pro checkpoint with an additional speculative decoding module attached.
That distinction matters. DSpark is not claiming to make the language model smarter. It is trying to make the same target model generate faster.
The Baseline: Normal Speculative Decoding
In standard speculative decoding:
- A draft model proposes
gammafuture tokens. - The target model verifies those tokens in one pass.
- The verifier accepts the longest valid prefix.
- The first rejected token is replaced by a target-model token.
- The next round begins.
The latency equation is:
latency per generated token = (draft time + verify time) / accepted tokens per round
So every speculative decoding system is trying to do three things:
- reduce draft time
- increase accepted tokens per round
- reduce wasted verification work
DSpark maps almost exactly to the second and third bullets.
Why Older Drafters Struggle
The DSpark paper separates older drafters into two broad categories.
Autoregressive Drafters
An autoregressive drafter generates draft tokens one by one:
draft token 1 -> draft token 2 -> draft token 3 -> ...
This is accurate because each draft token can depend on the previous draft tokens. But it is slow. If the draft block gets longer, draft time grows with the block size.
That means autoregressive drafters often need short blocks or shallow architectures. They get dependency modeling, but they give up some parallel speed.
Parallel Drafters
A parallel drafter predicts all draft positions in one forward pass:
draft token 1
draft token 2
draft token 3
draft token 4
all at once.
This is fast, and it allows larger draft blocks. But the later positions are predicted without knowing which earlier draft tokens were actually sampled.
That creates a strange failure mode.
Suppose the context allows two plausible continuations:
of course
no problem
A fully parallel drafter may independently mix the modes and produce:
of problem
or:
no course
Each individual position looked plausible under uncertainty, but the sequence is incoherent after the prefix becomes concrete.
That is suffix decay.
DSpark’s First Idea: Semi-Autoregressive Drafting
DSpark keeps the expensive part parallel.
The draft backbone still produces hidden states and base logits for the whole block in one pass. In the paper’s offline experiments, the DSpark implementation builds on DFlash-style parallel drafting.
Then DSpark adds a lightweight sequential head on top.
That head does not replace the parallel backbone. It adds a prefix-dependent transition bias so each sampled draft token can influence the next draft token.
In plain English:
Let the heavy model guess the whole block in parallel, then let a tiny serial module clean up local token-to-token consistency.
The paper describes two versions:
- a Markov head, which mostly looks at the immediately previous draft token
- an RNN head, which carries a small recurrent state across the draft block
The default DSpark variant uses the Markov head. The paper notes that the RNN head gives only marginal additional gains at longer proposal lengths, while being more complex to deploy.
This is a good engineering tradeoff. DSpark is not trying to reintroduce a full autoregressive draft model. It adds only enough serial dependency to fix the worst suffix drift.
Why This Helps Accepted Length
Speculative decoding accepts a prefix.
That means position 1 matters more than position 7. If position 1 is rejected, the rest of the proposed block is discarded.
Parallel drafters can be strong at position 1 because they can afford a deeper parallel backbone under the same latency budget. But they often decay later because positions are too independent.
Autoregressive drafters can stay coherent later, but they are constrained by sequential draft cost.
DSpark tries to get both:
- strong early-token capacity from a parallel backbone
- better later-token coherence from a lightweight sequential head
In the DSpark paper’s offline benchmark table, DSpark improves macro-average accepted length across Qwen3 targets:
| Target model | DSpark vs Eagle3 | DSpark vs DFlash |
|---|---|---|
| Qwen3-4B | +30.9% | +16.3% |
| Qwen3-8B | +26.7% | +18.4% |
| Qwen3-14B | +30.0% | +18.3% |
The same table shows the domain effect clearly. For Qwen3-4B, DSpark’s average accepted length is higher on structured work:
| Domain | DSpark accepted length |
|---|---|
| Math | 5.57 |
| Code | 5.12 |
| Chat | 3.49 |
That matches the intuition. Code and math have more local structure. Open-ended chat has more entropy, so the draft is less likely to match the target distribution deep into the block.
DSpark’s Second Idea: Verify Smarter
The first DSpark idea helps the drafter produce better blocks.
The second idea asks a different question:
Even if I can draft a long block, should I verify all of it?
The answer depends on two things.
First, how likely is each draft token to survive verification?
Second, how loaded is the serving engine right now?
Under light load, verifying a few extra tokens may be cheap. The GPU has spare capacity, and even a mediocre suffix might be worth checking.
Under heavy load, low-confidence suffix tokens are expensive. They consume target-model batch capacity that could serve other active requests.
So DSpark adds a confidence head and a hardware-aware prefix scheduler.
The Confidence Head
For each draft position k, DSpark predicts a confidence score:
c_k = probability that token k survives, assuming previous tokens survived
That assumption is important. Speculative decoding accepts a continuous prefix, so position 5 matters only if positions 1 through 4 were accepted.
The scheduler therefore works with cumulative prefix survival probabilities:
prefix survival at position k = c_1 * c_2 * ... * c_k
The paper also discusses calibration. Raw neural confidence scores are often overconfident. DSpark uses a post-hoc calibration method called Sequential Temperature Scaling so the predicted prefix survival probabilities better match observed acceptance rates.
This matters because the scheduler is not merely ranking tokens. It is estimating expected throughput.
The Hardware-Aware Prefix Scheduler
DSpark profiles the serving engine’s throughput curve. In the paper, this is represented as:
SPS(B)
where B is the verification batch size and SPS is the engine’s steps per second at that size.
Then, for a batch of active requests, the scheduler asks:
Which prefix lengths maximize expected system-wide token throughput?
For each request, DSpark can choose a different verification length.
One request may get a long prefix verified because its draft tokens look confident.
Another request may get only one or two tokens verified because the suffix is likely to be rejected.
Under heavier system load, the scheduler becomes more selective.
This is the part I find most production-relevant. It treats speculative decoding as a serving problem, not only a modeling problem.
The question is not:
Can the drafter generate 8 tokens?
The real question is:
Is verifying token 8 a better use of target-model capacity than serving another user's token?
DSpark’s scheduler is designed around that question.
Production Deployment Details
The paper says DSpark was deployed in DeepSeek-V4 serving against the older MTP-1 production baseline.
For the V4 deployment, DSpark uses:
- maximum draft length
gamma = 5 - a Markov sequential head
- a parallel backbone with three MoE layers
- a confidence head trained with the drafter and calibrated afterward
The paper also describes several system adaptations:
- communicating hidden states instead of full-vocabulary logits during training
- anchor-bounded sequence packing to avoid wasting memory on full contexts
- asynchronous scheduling to fit production CUDA graph and zero-overhead scheduling constraints
- variable-length verification support in serving kernels
Those details are easy to skip, but they explain why this is more than a modeling trick. A speculative decoding method can look good offline and still fail in production if it breaks batching, KV-cache layout, CUDA graph replay, or request scheduling.
Reported Production Results
The paper reports results under live user traffic for DeepSeek-V4-Flash and DeepSeek-V4-Pro.
At matched practical throughput levels:
| Serving engine | Reported per-user generation speedup |
|---|---|
| DeepSeek-V4-Flash | 60% to 85% faster |
| DeepSeek-V4-Pro | 57% to 78% faster |
The paper also reports throughput improvements at specific interactivity SLA anchors:
| Engine | SLA anchor | Reported aggregate throughput gain |
|---|---|---|
| V4-Flash | 80 tokens/sec/user | +51% |
| V4-Pro | 35 tokens/sec/user | +52% |
At stricter SLA points, the baseline falls into a low-concurrency regime, so the nominal multipliers become much larger:
| Engine | Strict SLA anchor | Reported nominal throughput gain |
|---|---|---|
| V4-Flash | 120 tokens/sec/user | +661% |
| V4-Pro | 50 tokens/sec/user | +406% |
I would not read those larger numbers as “DSpark is always 6x faster”. The paper itself frames them more carefully: those points show that DSpark extends the feasible interactivity frontier where the older baseline cannot efficiently support the strict SLA.
The more stable takeaway is:
DSpark moves the throughput-vs-latency frontier outward by accepting more useful tokens per round and avoiding wasteful verification under load.
Why DSpark Is Different From Just Using a Bigger Draft Block
A naive approach would be:
If speculative decoding helps, draft more tokens.
But longer blocks create two costs.
First, the suffix gets less reliable. If the drafter cannot model dependencies inside the block, the tail drifts.
Second, verification work grows. If the server verifies every drafted token, it may burn target-model capacity on tokens that were unlikely to survive anyway.
DSpark says:
Draft longer only if the draft remains coherent.
Verify longer only if the expected return is worth the serving cost.
That is a much more production-ready version of the idea.
What This Means for Smaller Local Setups
It is tempting to read the DSpark results and expect the same speedup on a local machine.
I would be careful.
Speculative decoding needs the draft path to be much cheaper than the target path. If I pair a 6B draft model with an 8B target model on a local machine, the draft model may not be cheap enough. The overhead can erase the benefit.
Local runtimes also may not have:
- optimized parallel verification kernels
- efficient KV-cache handling for speculative blocks
- scheduler support for variable verification length
- enough concurrency to benefit from load-aware pruning
So DSpark is most impressive as a production serving technique. The mechanism is general, but the speedup depends on hardware, model ratio, draft quality, batching, and runtime implementation.
Limitations
DSpark still pays a fixed draft-side cost. If a request has inherently low acceptance, the system may spend compute generating a block that mostly gets rejected.
The paper mentions this as a limitation and suggests that future work could use difficulty-aware early exiting inside the draft model.
There is also a training cost. The DeepSpec README warns that preparing the target cache can be very large; for the default Qwen3-4B setting, it notes roughly 38 TB of storage. This is not a small plug-and-play fine-tune.
Finally, the lossless guarantee depends on careful causality. A scheduler must not decide whether to admit a token based on future token information. DSpark spends real paper space on this because it is easy to accidentally introduce selection bias when using confidence scores.
My Takeaway
DSpark is useful because it focuses on the two places speculative decoding usually leaks performance:
- the drafter gets worse toward the suffix
- the verifier wastes target capacity on low-value tokens
The semi-autoregressive head improves the first problem. It gives the parallel drafter just enough local dependency to reduce suffix decay.
The confidence scheduler improves the second problem. It treats verification length as a live serving decision, not a fixed hyperparameter.
That combination is why DSpark is more interesting than “another draft model”. It is a speculative decoding system that thinks about model quality and production scheduling together.