Why DFly2 is 81%, 2.97x or 4.2x faster, depending on which number you read
Tencent's DFly2 speeds up language models like DeepSeek-V4.1-Flash on long contexts. Its draft helper doesn't keep a cache of its own; it reads along with the big model instead. We explain how that works, why four different speed figures are floating around for the same tool, and what you can actually use on your own machine today.

What this is about
Language models write token by token, and every token requires one full pass through the big model. Speculative decoding speeds that up. A small helper model, the drafter, guesses several tokens ahead. The big model checks the draft in a single pass and accepts everything up to the first mistake. Because the big model signs off on every token, the output stays identical. That's why it's called "lossless".
This works well for short chats. With 64,000 tokens of context and agents that read files and call tools, though, the gains shrink. That's because the drafter itself needs to know the whole context and has to carry its own KV cache for it, a scratchpad of intermediate results for every previous token. Tencent's DFly2, released on November 26, tackles exactly this problem. Since then, figures of +81%, 2.97x, 4.2x and 4.55x have been making the rounds. We explain what each one measures and whether people running local models get anything out of it.
Where the drafter gets stuck on long texts
New Chinese flash models like DeepSeek-V4.1-Flash, GLM-5.3-Flash and Tencent's Hy4 flash use sparse attention. A small pre-sorter, the indexer, picks the most important positions in the context for each new token, the so-called top-k selection. Only those positions get a closer look. That keeps compute manageable even with very long texts.
A classic drafter doesn't know about this shortcut. According to the DFly2 paper (arXiv 2611.34776), that creates three costs:
- Memory: A separate three-layer drafter cache significantly inflates context-dependent memory per token (see table below). Whatever the drafter occupies isn't available for more concurrent users.
- Prefill: That's the name for reading in the prompt. The drafter has to read the whole prompt too, which costs compute on the prefill servers.
- Compute time: With a full cache, drafter attention is barely noticeable at 4K context, but at 128K it eats 14 to 23% of every decode step. With a fixed budget, it stays at a constant 4 to 6%.
| Target model | KV per token (target) | Added by drafter cache | Factor |
|---|---|---|---|
| DeepSeek-V4.1-Flash | 4.4 KiB | 3.4 KiB | 1.76× |
| GLM-5.3-Flash | 11.7 KiB | 3.0 KiB | 1.26× |
| Hy4 flash | 17.2 KiB | 3.4 KiB | 1.20× |
Source: DFly2 paper, Table 2, bf16, three-layer drafter.
DeepSeek's own drafter, DSpark, is a useful comparison. It limits its cache to a sliding window of the last 128 tokens. That saves memory, but the window sees too little: according to the paper, a window of the same size captures less than a fifth of what the big model actually considers important. The older DFlash approach, on the other hand, drags the full cache along. On Hy4 flash, according to the paper, it collapsed to about one accepted token per step beyond its 32K training length. With a single user on agent tasks, it was actually slower end-to-end on DeepSeek-V4.1-Flash than using no drafter at all (0.63x to 0.78x).
The trick: read along instead of writing your own
DFly2 pairs each drafter layer with a sparse attention layer in the big model and shares two things with it:
- KV sharing: The drafter layer reads the compressed KV cache of its partner layer. It has no cache of its own.
- Index sharing: It only looks at the positions the big model's indexer has already selected. It doesn't need its own indexer.
Three further aids come on top. The drafter layers are initialized with the weights of their partner layer. The big model's last hidden state, meaning its final internal representation, feeds into the draft. And within a draft block, corrections are made position by position. A block consists of one anchor token plus five draft tokens.
Tencent backs up the idea with a measurement on DeepSeek-V4.1-Flash across 158,638 blocks. The selection the indexer made one step earlier covers almost 90% of what later tokens in the block would select. Depending on the model, that's 646 to 2,054 positions per draft token, so at most around 2,000 keys, no matter how long the context is. The drafter doesn't participate in prefill. When prefill and generation run on separate servers, the only extra transfer is a single vector per request. Because the drafter cache disappears, the paper says 1.73 times as many requests fit into the same memory at 32K context.
There's an interesting connection to a paper from April ("When Hidden States Drift", arXiv 2604.26412). Its authors showed on Qwen3-8B that sharing the KV cache improves acceptance rates for long look-aheads but does little end-to-end. One reason: shallow drafters are bad at estimating what the big model would "ask for". Our take: DFly2 closes exactly this gap by simply reusing the indexer's selection instead of estimating it. But that only works for models that have such an indexer.
Which drafter are we actually talking about?
You'll often read about "the 0.85B drafter with 5 layers". That's only true for the variant built into Hy4 flash (Model Card). The research drafters from the paper are built differently: three MoE layers with 128 experts each, according to the paper 6 to 14 billion parameters in total, 0.4 to 1.1 billion of them active. On Hugging Face you'll find DS-V4.1-Flash-DFly2-B6 with 14 billion, GLM-5.3-Flash-DFly2-B6 with 10 billion and Hy4-flash-DFly2-B6 with around 3 billion parameters. The drafters are under Apache 2.0, while the code in the AngelSpec repo uses a custom AngelSpec license. The target models are covered by their own licenses.
One tool, four numbers
All figures come from Tencent, measured on NVIDIA H20 with vLLM. Tencent retrained the comparison drafters DFlash and DSpark itself, using the same recipe and at nearly the same size. So they aren't the original releases.
| Number | What it measures | Conditions |
|---|---|---|
| +81% | Throughput (tokens per second across all users) vs. DSpark, not vs. no drafter | DeepSeek-V4.1-Flash, SWE 64K, many concurrent users, equal per-user speed; CodeSpan 64K: +62%, short texts: +28% |
| 2.97× | End-to-end speed incl. prefill vs. the model alone | single user, temperature 0, average of 7 short tasks (GSM8K to MT-Bench, 2K chat, max. 2,048 output tokens) |
| 4.2× | "Up to" figure for Hy4 flash on long-context and agent tasks | from Tencent's announcement; Chinese reports call it the highest single value. We couldn't find it in the published tables |
| 4.55× | Generation phase (decode) only | Hy4 flash, AgentLongBench, single user; end-to-end: 1.35× |
The most important difference is in the last row. On agent tasks, the model reads a lot and writes comparatively little. Speculative decoding only speeds up writing; reading the long prompt stays just as slow. That's why DeepSeek-V4.1-Flash drops from 3.10x (decode) to 1.50x (end-to-end) on agent tasks. DSpark reaches 1.44x there. So DFly2's lead in practice is much smaller than the decode number suggests.
On GLM-5.3-Flash, DFly2 hits 2.36x end-to-end in short chat, barely ahead of DSpark at 2.32x. The gap is clearer for acceptance length, meaning how many draft tokens the big model accepts per step on average: 4.03 versus 3.10 on agent tasks. For Hy4 flash on general tasks, Tencent reports only 3.9% more accepted tokens than DSpark.
So why do the gains shrink with many concurrent users in the first place? In its high-throughput recipe for DeepSeek-V4.1, SGLang turns speculation off entirely. The reasoning in the Cookbook: a speculation step has a fixed overhead, and at large batch sizes it no longer pays off. DFly2 attacks the problem from a different angle. With no drafter cache taking up memory, more requests fit on the GPU at once. According to the paper, the DFly2 curve sits above every comparison method at every concurrency level tested. At equal throughput, users are 15 to 24% faster. The paper doesn't include a run without any speculation, though.
What other researchers are trying
| Approach | Idea | Reported numbers |
|---|---|---|
| Strong Drafts Need Compact Memories | strong drafter with compressed memory for distant context | over 70% less drafter memory; up to 2.08× (Llama 3.1 8B) and 3.33× (70B), up to 32K |
| Adaptive DHiSparse | history kept in CPU memory, only selected parts are loaded back; drafter cache as a bounded ring buffer | GLM-5.3 + DFlash2, 100K, 128 users: 793 tokens/s per decode GPU (1.45× HiSparse) |
| SparseSpec | the model drafts itself with sparse attention and verifies with full attention, no training | up to 2.3× throughput on Qwen3; research prototype |
DFly2 is the only one of these approaches tailored specifically to models with a built-in indexer. It hasn't been tested on classic dense models.
What's landing in vLLM, SGLang and llama.cpp today
- Hy4 flash: The Model Card shows custom Docker images for vLLM (
"method":"dfly", 5 draft tokens) and SGLang (--speculative-algorithm DFLY). The examples use 8 GPUs together. - DeepSeek-V4.1-Flash and GLM-5.3-Flash: According to the Model Cards, vLLM support is "in progress", and there are no launch commands yet.
- vLLM work in progress: PR #69057 aims to combine DFly with HiSparse and fixes three bugs to get there. Before they were fixed, acceptance length dropped to 1.25. Draft PR #69916 brings DFly for Hy4 flash to Ada cards like the RTX 4090 D. In a single-user test, time per token fell from 178 to 73 ms, but so far only in the slower eager mode, and it hasn't been merged.
- llama.cpp: There's no official DFly2 support. PR #32517 for Hy4 flash itself hasn't been merged yet. DSpark already caused trouble on DeepSeek-V4: with multiple parallel slots it produced garbage output (#26741), and VRAM filled up over time (#27155, closed without a fix).
- Local engines: Basalt for Blackwell GPUs uses DFly2 by default with Hy4-flash. The r/LocalLLM fork basalt-dfly for DeepSeek V4.1 Flash and Qwen3.8 Flash Next reports "no speed numbers yet".
The only local measurement is in Tencent's GGUF card: using the Strata engine, 16 GiB of VRAM and offloaded experts, speed on code rose from 37.5 to 47.6 tokens/s (+27%), but on prose only from 36.8 to 38.7 (+5%). The feature is called "DFly" there, and the card doesn't say whether it's exactly DFly2. The smallest Q4 file is just under 157 GiB.
The bottom line
DFly2 cleanly solves a real problem: the drafter no longer drags its own memory through long contexts. That matters for providers serving many agent sessions at 64K and beyond in parallel. Our take: the most impressive number, +81%, is also the one most often misread. It compares DFly2 with DSpark, not with the model without a drafter, and it comes from a server setup with eight prefill instances per decode instance. Some reports attribute the 2.97x to SWE-bench, but it actually comes from short chat tasks.
Plenty remains open. All figures come from Tencent and were measured on a single GPU type. The comparison drafters are reimplementations, and the paper hasn't been peer-reviewed. It's also unclear whether vLLM and SGLang will merge DeepSeek and GLM support into their main projects. One user on X asked exactly that, since most drafters wither away in specialized forks. For home users: if you run Hy4 flash locally with lots of RAM, you'll get a noticeable boost when coding. For everyone else, DFly2 is a server technology for now.
Sources
- arXiv: DFly2 – Turbocharging Long-Context Speculative Decoding by Sharing the Target's Sparsity arxiv.org
- arXiv (HTML-Volltext): DFly2-Paper arxiv.org
- GitHub: Tencent/AngelSpec github.com
- Hugging Face: AngelSlim/DS-V4.1-Flash-DFly2-B6 huggingface.co
- Hugging Face: AngelSlim/Hy4-flash-DFly2-B6 huggingface.co
- Hugging Face: AngelSlim/GLM-5.3-Flash-DFly2-B6 huggingface.co
- Hugging Face: tencent/Hy4-flash huggingface.co
- Hugging Face: AngelSlim/Hy4-flash-GGUF huggingface.co
- MarkTechPost: Tencent Open-Sources DFly2 marktechpost.com
- Reddit r/LocalLLM: Lokaler Test von DFly2 reddit.com
- Reddit r/machinelearningnews: DFly2-Zusammenfassung reddit.com
- Phoenix Tech (ifeng): Hy4 flash 4,2-fach mit DFly2 tech.ifeng.com
- Sohu: 提速 4.2 倍!腾讯混元DFly2 sohu.com
- AlphaSignal: DFly2 4.2x alphasignal.ai
- Emergent: DFly2 boosts DeepSeek-V4.1-Flash emergent.sh
- Science Underway: Tencent drafter reuses sparse attention scienceunderway.com
- arXiv: Strong Drafts Need Compact Memories arxiv.org
- arXiv: Adaptive DHiSparse arxiv.org
- arXiv: When Hidden States Drift arxiv.org
- GitHub: sspec-project/SparseSpec github.com
- arXiv: AngelSpec arxiv.org
- SGLang Cookbook: DeepSeek-V4.1 docs.sglang.io
- LMSYS: DeepSeek-V4.1-Flash auf H20 lmsys.org
- vLLM PR #69057: DFly mit HiSparse auf HY4 github.com
- vLLM PR #69916: DFly für HY4 Flash auf Ada github.com
- llama.cpp Issue #27155: VRAM-Leck mit DSpark github.com
- llama.cpp Issue #26741: DeepSeek4 mit Spekulation und -np github.com
- GitHub: jesdga95/basalt github.com
- GitHub: Kemerd/basalt-dfly github.com
Ask the AI assistant
Questions about this article, installation or background? Our assistant knows this page and runs on our own machine, not in someone else's cloud.
The Assistant is an AI (Gemma 4) and can make mistakes – please check important details against the source. Questions are used only to generate an answer and are deleted after one hour. Please don't enter any personal data.
Comments
What do you think? Already tried it? Write it here, no sign-up needed.
Comments are public. Links aren't allowed, and we delete abusive posts. You can delete your own comment at any time in this browser. Learn more in the Privacy Policy.