@dzhulgakov: DSpark from @deepseek_ai ingeniously integrates many speculative decoding ideas to achieve 1.5x to 5x higher throughput…
Summary
DSpark from DeepSeek AI integrates speculative decoding ideas to achieve 1.5x to 5x higher throughput in production systems. This thread explains 10 key ideas from the basics.
View Cached Full Text
Cached at: 06/27/26, 06:00 PM
DSpark from @deepseek_ai ingeniously integrates many speculative decoding ideas to achieve 1.5x to 5x higher throughput in a real production system
Let’s understand it with 10 ideas, starting from the very basics
- Batching in LLM decoding
Generating tokens is bound on reading weights from memory. So decoding 10 tokens in parallel is only slightly slower than generating 1. Continuous batching leverages this insight
- Speculative decoding
For the same request, token N+1 depends on token N, so we can’t decode them in parallel. But if we can guess what the tokens are (“speculate”), we can quickly verify which prefix of them is correct from the main model perspective
- Draft model
How to speculate? With a model, of course. The simplest is to run a smaller model trained on the same distribution, e.g. Qwen 0.8B for Qwen 397B
- Speculation is not free
time_per_token = (num_tokens_drafted * drafter_time + verify_time(num_tokens_drafted)) / num_tokens_accepted
Slow to run speculator or drafting too many tokens with a low guess rate can be hurtful. The right balance is needed
- EAGLE and MTP
Make drafter an extra transformer layer of the main model, i.e. it consumes rich latent representation (last activation) in addition to the previous token. Allows to get away with 1-2 layers instead of the full model
Much faster and more accurate speculator
- DFlash
MTP needs to take N steps to generate N draft tokens. DFlash uses diffusion ideas to produce all N tokens in one forward pass
Much faster speculation, but draft quality sometimes better, sometimes worse than MTP/Eagle
- DSpark ~= Eagle + MTP
DFlash is stronger at initial positions Eagle3 is more coherent on long drafting but has lower quality guess in the beginning
DSpark combines both parallel block and autoregressive ideas, beating either approach
- Cheaper sequential block
Eagle3/MTP run full attention at each drafting position. Since DFlash has parallel block to capture previous context, sequential step can be much cheaper with RNN or even Markov model. All leads to an even faster but still accurate drafter!
- Variable length drafting and hardware-aware scheduler
What num_draft_tokens should be? It varies:
- some requests (e.g. coding) are easier to predict than others
- optimal length depends on server load (batch size). Speculate more with low load when GPU compute is free, speculate less when running with high throughput
Some engines have a static –num-draft-tokens argument. It’s much better to vary it dynamically based on the drafter’s confidence and the current server load.
Implementing it is tricky. CPU/GPU are heavily pipelined in inference engines, and varying length usually requires changing tensor sizes and going back to the CPU, slowing things down.
With careful implementation (and a lot of cool CUDA kernels), everything can be done on GPU without extra overhead
- Online drafter calibration
Models tend to be overconfident in predicting the next token making it hard to get threshold for stopping drafting
But we can look at the runtime drafter performance and adjust (“calibrate”) thresholds on the fly
Putting it together
The magic of DeepSeek is in excellent system engineering with close model co-design. Many of these ideas were published before. It’s very impressive how they integrate them together to deliver huge e2e improvements with auto-adapting system
We do tons of speculative decoding research and adaptive system engineering at @FireworksAI_HQ, including continuously training and calibrating drafters for customer workloads.
Looking forward to building DSpark ideas and sharing better inference with the world.
Similar Articles
@danielhanchen: DeepSeek just released DSpark for V4 Flash & Pro, a new speculative decoding method boosting throughput by 51% to 400%!…
DeepSeek released DSpark, a speculative decoding method that boosts throughput by 51% to 400% for V4 Flash & Pro, along with the open-source DeepSpec codebase for training and evaluating draft models.
DeepSeek open sources DSpark, a new framework to speed up LLM inference by up to 85% (18 minute read)
DeepSeek open-sourced DSpark, an MIT-licensed framework using speculative decoding to accelerate LLM inference by up to 85%, with support for multiple model families including its own DeepSeek-V4, Alibaba's Qwen, and Google's Gemma.
@DeRonin_: DeepSeek just dropped a 5-page paper + free GitHub repo that makes any LLM respond 80% faster it's called speculative d…
DeepSeek released a paper and MIT-licensed open-source implementation of speculative decoding (DSpark) that speeds up LLM responses by up to 80% by using a small 'guess' model and a large 'check' model, achieving both speed and accuracy without tradeoffs.
DSpark: Confidence-Scheduled Speculative Decoding with Semi-Autoregressive Generation
DSpark is a speculative decoding framework that combines semi-autoregressive draft generation with confidence-scheduled verification to accelerate LLM inference and improve throughput in high-concurrency settings.
@_ARahim_: DeepSeek's DSpark speculative-decoding drafters, benchmarked on a Mac Native on Apple Silicon (MLX), lossless; identica…
mlx-dspark brings DeepSeek's DSpark and z-lab's DFlash speculative decoding drafters to Apple Silicon via MLX, enabling lossless speedup (~1.4–1.6×, up to 2× on code/math) and an OpenAI-compatible API for local inference.