Back to Home

Tencent DFly2 Drafts Tokens With No KV Cache of Its Own

Tencent's Hunyuan AI Infra team has open-sourced DFly2, a block-parallel speculative decoding drafter for natively sparse LLMs.

Its defining choice: the drafter keeps no KV cache of its own.

That is more than a speed pitch. Draft memory is what quietly caps concurrency in long-context serving, not raw FLOPs.

DFly2 ships with Hy4 flash, a 220B-total MoE with about 12B active parameters and a 1M-token context window.

The drafter itself is 0.85B parameters across five layers, already wired into the model's vLLM and SGLang recipes.

How DFly2 Borrows the Target's Sparsity

Speculative decoding is a two-party contract: the drafter proposes tokens, the target verifies them in one pass, and output stays lossless.

The cost sits at the edges, where a conventional drafter attends the whole prefix and stores its own KV cache.

DFly2 instead pairs each draft layer with one sparse attention layer in the target.

KV sharing lets the draft layer read the paired target layer's latent cache instead of materialising its own.

Index sharing restricts attention to the top-k positions the target's indexer already selected.

Each draft layer also initialises from its paired target layer's weights, and the target's last-layer hidden state is gated into the draft block.

Inside a block, the drafter rereads the shared context slot by slot before committing tokens.

The justification is empirical. On DeepSeek-V4.1-Flash, a selection made one step early covers near 90 percent of later choices.

A same-size sliding window recovers under 20 percent. Early selection is the target's sparsity pattern, not a proxy for it.

Each draft token touches at most about 2K keys, so drafting cost stays flat as context grows.

Prefill is skipped entirely. Only one last-layer hidden state crosses from target to drafter.

Memory is where the design pays off. Per token at bf16:

TargetTarget KVDrafter cacheIncrease
DeepSeek-V4.1-Flash4.4 KiB3.4 KiB1.76x
GLM-5.3-Flash11.7 KiB3.0 KiB1.26x
Hy4 flash17.2 KiB3.4 KiB1.20x

Remove that overhead at 32K and the same pool holds 1.73x as many concurrent requests.

For a serving cluster, that is a capacity decision rather than a benchmark curiosity.

Benchmarks, and What They Do Not Prove

Every figure below is self-reported. Baselines are DFlash and DSpark retrained on the same recipe, which is fair but still worth scrutiny.

Average accepted length on general workloads, temperature 0 and 1:

  • DeepSeek-V4.1-Flash: 4.12 / 3.88, versus 3.81 / 3.51 for DSpark
  • GLM-5.3-Flash: 3.96 / 3.69, versus 3.68 / 3.35
  • Hy4 flash: 3.96 / 3.95, versus 3.81 / 3.73

The margin over the stronger baseline runs 3.9 to 10.5 percent on general tasks.

It widens to 10.0 to 31.5 percent on long-context and agentic workloads up to 128K.

The stability gap is the more interesting number: DFly2 stays within 4 percent of its general average on agentic sets.

DSpark degrades by 11 to 21 percent there, the usual symptom of bloated draft state.

End-to-end greedy speedup at concurrency one: 2.97x, 2.36x and 3.19x across the three targets.

At matched per-user speed, throughput rises 28 percent on short text and 62 percent on CodeSpan 64K.

On SWE 64K it rises 81 percent; at matched throughput each user decodes 15 to 24 percent faster.

Tencent's announcement also claims up to 4.2x decoding on Hy4 flash agentic tasks, roughly 30 percent over same-recipe DSpark.

The caveats are ordinary: one vendor's harness, and three sparse targets sharing the same architectural precondition.

DFly2 is not a standalone binary. It is a method that expects a sparse-attention target.

  • vLLM: the vllm-openai:hy4-flash image exposes a dfly method that is on by default; tests ran on H20 at TP8
  • SGLang: lmsysorg/sglang:hy4-flash implements the same DFLY algorithm
  • Training: AngelSpec expects one node of eight GPUs, four serving and four training
  • Licensing: AngelSpec is Apache-2.0, Hy4 flash weights use the Tencent Hy License, and a community GGUF drafter exists

API pricing for Hy4 flash sits at $0.070 per million input and $0.281 per million output tokens.

The strategic read is narrower than "open-source AI wins again". DFly2 bets that sparse attention is the default frontier architecture.

If that holds, the axis is not tokens per second but concurrent users per fixed HBM budget.

Comments

No comments yet. Be the first to share your thoughts!