Overview
Million-token context is no longer the hard part. A whole codebase, a hundred-page contract, dozens of agent turns all fit in one go. The hard part comes next: reading takes seconds, emitting tokens takes minutes, and the longer the context the wider the gap.
Speculative decoding is the established answer. A small fast drafter guesses a handful of tokens, the target model verifies them in one batch, accepted guesses stay and rejected ones get rewritten. Output is identical to token-by-token generation. A drafter lives or dies on acceptance length, the number of draft tokens the target accepts per verification pass.
DFly2, open sourced by Tencent Hunyuan on 26 November 2026, stays on that path but is not a new model. It bolts onto the side of an existing one. Target weights stay put, output stays byte-identical, only wall-clock time changes. The technical report is arXiv 2611.34776, training code landed in AngelSpec, and weights ship with Hy4 and Hy4 flash.
The trouble sits in the drafter's own cache. Drafters inherited a dense-era design that maintains a separate KV cache, so longer context means more attention compute, more memory, and a fight with the target model over VRAM. Hy4 flash uses DSA sparse attention, where each token attends to at most 2,048 positions picked by an indexer. Full attention is too expensive for a drafter, and a sliding window misses the distant positions the indexer selected, which are exactly what the target model relies on next. The authors put a number on that hidden cost: a self-built full cache adds roughly one fifth to per-token KV on Hy4 flash and roughly three quarters on DeepSeek-V4.1-Flash.
Key Features
- Shared KV and shared index: Every draft layer reads the KV cache already held by its paired sparse target layer and attends only to the at most 2,048 positions that layer's indexer selected. Positions can come from anywhere in the text, but their count is fixed and does not grow with context.
- Zero extra KV memory: The drafter keeps no cache of its own, so it never competes with the target model for VRAM and per-token attention cost decouples from context length.
- Weights initialised from the paired layer: Draft layers start from the corresponding target layer and inherit the indexer's shared query latent, so draft queries land in the same space that produced the original selection.
- Last-layer hidden state as a correction: The target's final hidden state enters through a gated fusion at the block head, and a light DFly correction head refines each position, filling the one predictive signal that reused KV cannot supply.
- Rollout-free online distillation: DFly-OPD scores the drafter on its own drafts against the target model, keeping training and inference distributions aligned. It drops the rollout stage Draft-OPD needs and costs only one extra target forward over SFT.
- Prefill-decode friendly: Drafting happens only on the decode side. Prefill runs the target model alone and passes a single final-layer hidden state across, saving 98.5 MiB of transfer at 128K context compared with single-layer MTP.
Use Cases
- Question answering and summarisation over long documents and full repositories
- Speeding up multi-turn agent trajectories and tool-call chains
- Inference-side acceleration for services already running Hy4 flash, with no model swap
- Deployment acceleration for DeepSeek-V4.1-Flash and GLM-5.3-Flash
- A reference implementation for speculative decoding under sparse attention
Pros
- Lossless acceleration: output matches token-by-token generation, so quality needs no re-evaluation
- Very thin drafters, with Hy4-flash-DFly2-B6 using three MoE layers and sharing embedding and LM head with the target
- Validated across three different sparse architectures, making this a method-level release rather than a single-model patch
- The AngelSpec training framework ships alongside it, covering seven drafter architectures switched by config
- Apache 2.0, with both weights and training code available
Pricing
Code is Apache-2.0 at github.com/Tencent/AngelSpec. Weights live under the AngelSlim organisation on Hugging Face and are published alongside Hy4 and Hy4 flash, free to download and self-host. DFly2 carries no separate charge; inference cost follows whichever target model it accelerates. vLLM speculative decoding support is marked in progress, so production use needs its own validation.
Summary
Same model, same weights, identical output, but up to 4.2 times the token throughput on long-context and agent workloads by reusing the target model's KV cache, sparse indices, weights and hidden states. Open sourced by Tencent Hunyuan with the AngelSpec training framework, validated on three sparse architectures.
Version History
- DFly2 released with weights, training code and technical report (2026-11-26): A new speculative decoding drafter from Tencent Hunyuan that reuses the target model's KV cache and indexer selections. Across 19 public benchmarks it reports roughly 12 percent higher average speedup than DSpark on agentic work and 30 percent on long context, peaking at 4.2 times on AgentLongBench at 64K. Acceptance length rises up to 68.5 percent on agentic tasks and leads by 10.4 percent on real WorkBuddy tasks. At 128K it moves 98.5 MiB less than single-layer MTP and lifts end-to-end throughput by 26 percent.