← AUTOMATER NEWSROOM

Tencent's DFly2 Gives Up Its Own Cache, Reads the Target Model's Sparse Attention Instead

Tencent open-sourced DFly2, a drafter that reads the target model's sparse KV cache and index picks, adding zero extra KV memory at any context length.

Side-by-side diagram comparing a conventional speculative-decoding drafter, whose own cache grows with context length, against Tencent's DFly2 drafter, which reads the target model's existing KV cache and sparse-attention index picks and stays flat at any context length.Side-by-side diagram comparing a conventional speculative-decoding drafter, whose own cache grows with context length, against Tencent's DFly2 drafter, which reads the target model's existing KV cache and sparse-attention index picks and stays flat at any context length.
Original diagram contrasting a conventional speculative-decoding drafter's growing cache against DFly2's flat-cost design, which reuses the target model's own KV cache and sparse-attention index selections, based on Tencent's AngelSpec GitHub repository and the DFly2 arXiv paper (2611.34776).

Speculative decoding speeds up LLM serving by letting a small “drafter” model guess several tokens ahead, which the big target model then verifies in one pass. It works well, but on today’s natively sparse models — DeepSeek-V4, Tencent’s Hy4 — it has run into a new cost: the drafter itself needs a context cache, and that cache grows (or needs its own selection logic) as the context gets longer. On Nov. 26, Tencent’s Hunyuan AI Infra team open-sourced DFly2, a drafter architecture that removes that cost entirely by reading the target model’s own cache and the target’s own sparse-attention position picks, rather than building anything of its own.

GitHub repository page for Tencent/AngelSpec showing the file listing, branch selector, About sidebar with topic tags, and star/fork counts, with the README text and commit dates still rendering as blurred loading placeholders.
The public Tencent/AngelSpec GitHub repository page, captured Nov 28, 2026, showing the file tree, branch bar, About sidebar (447 stars, 40 forks) and topic tags; the README content itself had not finished loading in this capture. · Original source

Why sparse targets broke the old drafter recipe

Models like DeepSeek-V4.1-Flash and Hy4 flash use native sparse attention: an indexer picks a fixed, small set of positions for each query instead of attending to the whole context, which is what keeps long-context decoding from becoming quadratic. Speculative decoding matters most exactly where decoding is slowest — long, agentic sessions — so drafters increasingly have to run on these sparse targets too.

The arXiv paper describing DFly2 lays out the problem plainly: drafters that avoid keeping a cache of their own still read everything in the target’s cache or a recent sliding window, because computing a position selection per query inside the drafter would itself cost more as context grows. But a sparse target has already made that selection, for every query, over a cache it keeps anyway. The paper’s authors measured how much that one selection, made a step early by the target’s own indexer, still predicts what later tokens would pick — close to nine-tenths of it on DeepSeek-V4.1-Flash. DFly2 is built to exploit that overlap directly.

How DFly2 actually works

According to the AngelSpec repository, each DFly2 draft layer is paired with a corresponding sparse-attention layer in the target model and reads two things straight from it:

  • KV sharing — the same KV cache the target layer already cached, with no separate cache of its own
  • Index sharing — the same top-k positions the target’s indexer already selected for that query, a fixed number of positions no matter how long the context is

That gives DFly2 three concrete properties the repo calls out: each draft token attends to at most roughly 2,000 keys regardless of context length, there’s zero extra KV memory for the drafter, and the design is PD-disaggregation ready — DFly2 is not involved in prefill at all, so the handoff from prefill to decode only has to carry one extra last-layer hidden state.

What the numbers say

The arXiv abstract reports that DFly2’s margin over the strongest same-recipe baseline (DSpark) widens from 3.9–10.5% on general workloads to 10.0–31.5% on long-context and agentic benchmarks. At high concurrency on DeepSeek-V4.1-Flash, at matched per-user decode speed, DFly2’s throughput comes out 62% and 81% higher than the baseline on two 64K-context test sets.

The GitHub README publishes the full benchmark table behind those headline numbers, comparing DFly2 against DFlash and DSpark — all trained with the same AngelSpec recipe — across long-context sets (LongSpec, CodeSpan, LSWE) and agentic sets (ALB, MemAgent, BFCL-v3, SWE):

Target Drafter Agentic avg. decode speedup Agentic avg. end-to-end speedup
DeepSeek-V4.1-Flash DSpark 2.61x 1.44x
DeepSeek-V4.1-Flash DFly2 3.10x 1.50x
GLM-5.3-Flash DSpark 2.14x 1.17x
GLM-5.3-Flash DFly2 2.61x 1.22x
Hy4 flash DSpark 2.63x 1.55x
Hy4 flash DFly2 3.41x 1.67x

Speedups are measured at a concurrency of one against plain autoregressive decoding, greedy decoding. On X, Tencent’s own account framed the same release more bluntly for operators: DFly2 “boosts DeepSeek-V4.1-Flash serving throughput by up to 81%” at 64K context, and on Hy4 flash agentic tasks it “runs up to 4.2x faster, beating same-recipe DSpark by ~30% and accepting 10.4% more draft tokens.”

What operators can actually do with it

This isn’t a paper-only result. The AngelSlim organization on Hugging Face already hosts three DFly2 draft models — for Hy4 flash, DeepSeek-V4.1-Flash and GLM-5.3-Flash — alongside ready-made vLLM and SGLang configs in the AngelSpec repo (configs/vllm_dsv41_flash_dfly2.yaml, configs/vllm_glm53_flash_dfly2.yaml). Anyone self-hosting one of those three targets for coding-agent or other long-context serving can drop in a DFly2 draft model today instead of training or fine-tuning a drafter from scratch.

The practical case for switching comes down to the thing every operator running speculative decoding at scale eventually hits: a drafter’s memory and prefill cost that grows with context length. Because DFly2 keeps no cache of its own and reads a fixed ~2K keys per draft token no matter how long the conversation runs, its resource footprint doesn’t degrade as agentic sessions get longer — which is precisely the workload where speculative decoding pays off the most and where DFlash- and DSpark-style drafters have been losing the most ground, according to the benchmark table above.

AngelSpec itself is a training framework, not just a model drop: it’s the same code Tencent used to train DFly2, DFly, DFlash, DFlare, Eagle3, DSpark and MTP drafters behind one config-driven pipeline, so teams training against other sparse targets can reuse the recipe rather than reinvent it. DFly2 is part of a broader industry push to stop paying twice for the same context: see our coverage of Ramp Labs and Baseten’s speculative encoding, which lets one small translator model pass context between seven different target models without a re-prefill. For more background on how speculative decoding and draft models fit into a serving stack, see our explainer on llama.cpp speculative decoding for local coding models and recent coverage of EAGLE-4’s adaptive drafter.

Sources

  1. GitHub - Tencent/AngelSpec: A unified, torch-native training framework for MTP and block-parallel speculative decoding. · GitHub
  2. [2611.34776] DFly2: Turbocharging Long-Context Speculative Decoding by Sharing the Target's Sparsity
  3. AngelSlim (AngelSlim)
  4. Tencent AI on X: "We just open-sourced a speculative decoder that speeds up sparse models like DeepSeek-V4.1-Flash, GLM-5.3-Flash, and our own Hy4 flash. At 64K context, DFly2 boosts DeepSeek-V4.1-Flash serving throughput by up to 81%. On Hy4 flash agentic tasks, it runs up to 4.2x faster, beating…