DeepSeek open-sources a toolkit for making its models answer faster

In short

60%–85% faster per-user generation on V4-Flash, DeepSeek's live traffic; 57%–78% the same measure on V4-Pro; 7 draft tokens per round in the model card's vLLM example; MIT licence on the DeepSpec code

How speculative decoding works (our explanation)

A language model normally writes one token (a word or word piece) at a time, and each token needs a full pass through the whole network. That leaves expensive chips waiting. Speculative decoding adds a small, fast draft model that guesses the next several tokens. The big target model then checks all the guesses in one pass, keeps the longest run that matches what it would have written itself, and adds one more token of its own. The paper states that the acceptance rule preserves the target model's output distribution, so the answers should not get worse, only quicker.

The speed-up depends on how many guesses survive each check, which the paper calls the accepted length. A better draft means more tokens kept per pass.

What DeepSpec contains

DeepSpec's README describes a full pipeline in three stages: data preparation (download prompts, regenerate answers from the target model, build a cache of the target's outputs), training, and evaluation on nine benchmarks (GSM8K, MATH-500, AIME25, HumanEval, MBPP, LiveCodeBench, MT-Bench, Alpaca, Arena-Hard v2). It supports three draft designs: DSpark, DFlash and Eagle3.

Two cautions from the README. The target cache is large: it gives roughly 38 TB for the default Qwen3-4B setup. And the default scripts assume one node with 8 GPUs, though you can use fewer. This is a lab-scale tool, not a laptop one.

How open it is

In plain words (our summary), the MIT licence lets you use, change and sell the code, including in a product, if you keep the copyright and licence notice. The Hugging Face record for the one small draft we checked (Qwen3-4B DSpark) carries no licence tag, so check each repository before building on it.

How DSpark drafts

Most earlier drafters either guess one token after another (accurate, but slow when the draft is long) or guess a whole block at once (fast, but the guesses do not know about each other, so later ones go wrong). The paper's DSpark is semi-autoregressive: a parallel backbone produces the block in one pass, and a light sequential module adds links between neighbouring guesses. A second part, confidence-scheduled verification, estimates how likely each guess is to survive and sends the big model only the guesses worth checking, depending on how busy the server is. Without it, checking doomed tokens uses up capacity on a busy service.

The numbers, and who measured them

Offline, DeepSeek compared the drafters on its own benchmarks, with the scheduler off and sampling temperature 1.0. DSpark's accepted length was longer than Eagle3's and DFlash's on every target and test in the paper's Table 1. For Qwen3-4B:

Averaged across the benchmarks, the paper puts DSpark's accepted length 30.9%, 26.7% and 30.0% above Eagle3 on Qwen3-4B, 8B and 14B, and 16.3%, 18.4% and 18.3% above DFlash. Structured work is easier to guess than conversation: 5.57 for maths and 5.12 for code, against 3.49 for chat, on Qwen3-4B.

The headline figures come from the live V4 service. DeepSeek compares DSpark (up to 5 draft tokens) with its former production setup, called MTP-1, which drafts one token. At the same total throughput, per-user speed rose 60% to 85% on V4-Flash and 57% to 78% on V4-Pro. At a fixed per-user speed target of 80 tokens a second, V4-Flash's total throughput was 51% higher. At 120 tokens a second the old setup could serve only a few users at once, which gave a 661% gain; the authors say not to read that as a general multiple. The paper says DSpark replaced MTP-1 two weeks after the V4 preview release.

Trying it

The V4-Flash-DSpark card says one flag turns it on in vLLM: --speculative-config '{"method":"dspark","num_speculative_tokens":7,"draft_sample_method":"greedy"}'. Its example serves the model on a single 4-GPU GB300 node. The card gives no speed figures; those are in the paper. The V4 models are huge (Flash is 284B parameters with 13B active, Pro 1.6T with 49B active), so for most readers the smaller Qwen3 and Gemma drafts are the practical way to try DeepSpec.

Terms in plain English

Where things stand

The DSpark paper is a preprint from DeepSeek, not yet peer reviewed, and the live-traffic results come from its own service, so they may not carry over to other hardware or other traffic. The authors say the checkpoints and DeepSpec are released to support further research on efficient serving. The repository invites new algorithms. The README also notes that a draft should be fine-tuned again for a specific domain, especially if the target runs in thinking mode, because the released drafts were trained on non-thinking answers.

Sources

Sources

More from AI in China

All stories from AI in China