# Tencent Open-Sources DFly2 for 4.2x Long-Context Speed

*Updated on November 26, 2026*

Tencent's Hunyuan AI Infra team has open-sourced `DFly2` in full on November 26, 2026, releasing model weights, training code inside `AngelSpec v0.2.0`, and a technical report showing up to a `4.2x` lossless decode speedup on long-context and agentic workloads. Built specifically for natively sparse-attention models such as `Hy4 Flash`, `DeepSeek-V4.1-Flash`, and `GLM-5.3-Flash`, DFly2 solves the exact memory and prefill bottleneck that causes conventional speculative decoding drafters to break down past `32K` tokens.

Standard speculative decoding speeds up autoregressive inference by letting a small draft model propose multiple future tokens that the target LLM verifies in parallel, preserving exact output quality. Yet existing block-parallel drafters like `DFlash` and `DSpark` were designed for dense targets: they maintain their own separate KV cache across the entire prompt or a sliding window. On `64K` to `128K` agentic sessions, building a second draft KV cache can double time-to-first-token (TTFT), consume scarce VRAM needed for batch concurrency, and collapse accepted draft lengths once prompts exceed the `32K` training window.

DFly2 eliminates the drafter's cache completely by exploiting a property sparse-attention targets already pay for. Models using DeepSeek-style sparse attention (DSA) run an internal compressed indexer that picks a fixed top-`k` set of relevant token positions per query. Tencent's researchers measured that one top-`k` index selection made a step early still covers close to `90%` of the positions later tokens in the same draft block select on `DeepSeek-V4.1-Flash`.

Each DFly2 draft layer therefore directly reuses two existing target artifacts: the paired target layer's KV cache (**KV Share**) and its indexer's selected positions up to `2,048` keys (**Index Share**). Because every draft token attends to at most `~2K` positions regardless of whether the prompt is `8K` or `128K` tokens long, DFly2 adds zero extra KV memory, stays completely out of prefill, and integrates cleanly with prefill-decode (PD) disaggregated serving clusters by transferring just one additional final-layer hidden state.

<a aria-hidden="true" id="executive-fast-facts"></a>  Fast Facts

- **Full Open-Source Weights and Training Code**: Released November 26 via [arXiv:2611.34776](https://arxiv.org/abs/2611.34776), [github.com/Tencent/AngelSpec](https://github.com/Tencent/AngelSpec), and Hugging Face (`AngelSlim`), DFly2 ships both dense and MoE drafter weights trained across `Hy4`, `Hy4 Flash`, `DeepSeek-V4.1-Flash`, and `GLM-5.3-Flash`.
- **Up to 4.2x Peak Speedup and 81% Higher 64K Throughput**: On `19` public benchmarks for `Hy4 Flash`, Tencent reported peak single-task acceleration up to `4.2x` and average speedups roughly `12%` to `30%` higher than same-recipe `DSpark` on long-context and agentic suites (also reported by [ITHome](https://www.ithome.com/1/032/929.htm) and [AlphaSignal](https://alphasignal.ai/news/tencent-open-sources-dfly2-hitting-4-2x-speed-on-long-context-ai)). Serving `DeepSeek-V4.1-Flash` at high concurrency with matched per-user speed, DFly2 boosted throughput `28%` on short text and `62%` and `81%` on two `64K`-context long-context and agentic sets.
- **Length Generalization Beyond 32K Training**: While all drafters trained at `32K` context, `DFlash` collapsed to as few as `1.08` accepted tokens per step on `Hy4 Flash` past `32K` and `DSpark` dropped `11%` to `21%` on agentic prompts. DFly2 held accepted length within `4%` of its general-purpose average across contexts up to `128K`, widening its acceptance lead from `3.9%`–`10.5%` on general prompts to `10.0%`–`31.5%` on long-context and agentic workloads.
- **Zero Prefill Tax and PD-Disaggregation Fit**: Unlike `DFlash` variants that doubled TTFT on `DeepSeek-V4.1-Flash` by populating their own prefill cache (making some agentic runs slower end to end than running without speculation), DFly2 skips prefill entirely and adds only one last-layer hidden-state transfer across PD-disaggregated nodes.
- **Architectural Boundary Condition**: DFly2 relies directly on a natively sparse target model exposing a top-`k` sparse KV cache and indexer; it cannot drop straight onto purely dense-attention models without an equivalent sparse selection layer.

## Comparing Speculative Drafters on 64K–128K Agentic Workloads

Serving teams running high-concurrency coding and deep-research agents need to evaluate speculative decoding on **end-to-end throughput and TTFT**, not just synthetic short-prompt decode tokens per second.

| Drafter Architecture | Extra Draft KV Memory | Prefill TTFT Overhead | Agentic Decode Gain vs. Stronger Baseline | 64K Concurrency Throughput (`DS-V4.1-Flash`) |
|---|---|---|---|---|
| **No Speculation** | Zero | None | Baseline (`1.0x`) | Baseline |
| **`DFlash` (Full Draft Cache)** | Grows linearly with prompt | Up to `2x` TTFT (can end slower overall) | Collapses to `1.08` tok/step past `32K` on `Hy4 Flash` | Constrained by dual KV cache |
| **`DSpark` (Windowed Cache)** | Fixed sliding window | Low | Drops `11%`–`21%` on long agentic prompts | Baseline reference |
| **`DFly2` (KV Share + Index Share)** | **Zero** (`<=2,048` shared keys) | **Zero** (PD-disaggregation ready) | **`+12%` to `+30%` faster** (`+10.0%`–`31.5%` accepted length) | **`+62%` (long-context) / `+81%` (agentic)** |

The PD-disaggregation detail matters hugely for modern multi-node inference clusters (`vLLM`, `SGLang`, and custom TensorRT-LLM fleets). Separating prefill GPUs from decode GPUs is already standard practice for `64K+` agent loops so long prompt ingestion does not stall interactive token streaming. Any speculative drafter that requires shipping a second prefill KV cache over InfiniBand or RoCE eats directly into inter-node bandwidth. Passing only a single final-layer hidden state keeps network overhead tiny while boosting decode batch utilization by `62%` to `81%`.

Keep expectations calibrated around the `4.2x` headline figure: `4.2x` is the peak single-benchmark speedup reported on `Hy4 Flash` under favorable long-context/agentic acceptance, not a guaranteed floor on high-temperature creative sampling. Even at conservative acceptance rates, though, eliminating TTFT penalties and dual KV memory removes the primary reasons infrastructure teams previously turned speculative decoding off on long-context production endpoints.

## Evaluating `AngelSpec v0.2.0` for Sparse-Attention Serving Fleets

Inference engineers hosting `DeepSeek-V4.1-Flash`, `GLM-5.3-Flash`, or `Hy4 Flash` can pull the open-source training and serving artifacts from Tencent's repository to measure real TTFT and tokens-per-second lift on production traces:

```
# Clone AngelSpec v0.2.0 (supports DFly2 + 6 additional drafter architectures)
git clone https://github.com/Tencent/AngelSpec.git
cd AngelSpec

# Download open MoE/dense DFly2 drafter checkpoints from Hugging Face (AngelSlim)
huggingface-cli download AngelSlim/DFly2-DeepSeek-V4.1-Flash --local-dir ./weights/dfly2
```

When benchmarking against your baseline serving configuration, capture both `TTFT` and `inter-token latency (ITL)` across `8K`, `32K`, `64K`, and `128K` prompts at production concurrency (`32` to `128` simultaneous requests) rather than single-stream batch-1 tests.

  Next Steps

1. **Audit Whether Your Target Models Use Native Sparse Attention**: If your fleet serves `DeepSeek-V4.1-Flash`, `GLM-5.3-Flash`, or `Hy4 Flash`, benchmark `DFly2` immediately to reclaim `62%`–`81%` throughput at `64K` context without expanding GPU VRAM.
2. **Measure End-to-End Agent Latency Including Prefill TTFT**: Retest any existing `DFlash` or windowed speculative drafter on `>32K` agent traces to verify it is not silently inflating TTFT and negating decode savings.
3. **Prepare PD-Disaggregated Clusters for Hidden-State Transfer**: Watch `AngelSpec` upcoming inference-image drops and upstream `vLLM`/`SGLang` support for `KV Share` and `Index Share` hooks so PD transfer pipelines only carry the extra final-layer hidden state.