← AI glossary

AI glossary · Basic · Language models · Efficiency & infra

DFly2

DFly2 is a draft model (helper model) for speculative decoding, released as open source by Tencent. In sparse attention LLMs that handle long contexts, it speeds up response generation by directly reusing the target model's KV cache and token selection results.

About this term
Level
Basic · Technical terms you often meet in AI news
Added
2026-11-30
In plain words It is similar to a junior assistant who quickly drafts a reply by looking only at the boss's notepad and the parts the boss has already highlighted, while the boss skims the draft in one pass and approves it. In practice, though, the target model regenerates everything from the point where the draft goes wrong, so the target model is responsible for the quality of the final answer.

What it is and what is different

Speculative decoding is a technique in which a small helper model (draft model) guesses several upcoming tokens in advance, and a large target model verifies them in one pass to speed things up. However, existing draft models keep their own separate KV cache (memory that stores computation results for previously processed tokens), so as context grows they use more GPU memory and also spend time on prefill, the step that reads the initial input. DFly2 is designed so that the helper model never builds its own cache and instead reads the target model's cache directly. Tencent posted the technical report to arXiv on November 25, 2026, and announced the release on X the same day.

Conventional draft models vs DFly2

Conventional draft modelMaintains its own separate cache

  • Reads the full context or only the recent span
  • Memory load grows with context length
  • Requires separate prefill time

DFly2Reuses the target model's

  • Reads the target model's KV cache directly
  • Looks only at indexer-selected positions
  • Works only with sparse attention models

공통 A small model drafts, a large model verifies in one pass

Both are helper models for speculative decoding, but they differ in where they get context information.

How it works

DFly2 targets sparse attention models, meaning models that do not look at the entire long context but compute only over the token positions needed for each query. Such target models maintain a KV cache anyway, and a component called the indexer already chooses 'which positions to look at.' Each DFly2 layer reads the KV cache of its paired target model layer (KV sharing) and looks only at the positions chosen by that layer's indexer (index sharing). As a result, the helper model guesses several tokens at once as a single block, with neither position-selection computation nor its own cache. The paper reported that positions chosen one step earlier still cover about nine-tenths of the positions chosen by later tokens, which is why this reuse works.

Reusing the target model's cache and selectionsLong-context input → Target model; Target model → KV cache; Target model → Indexer; KV cache → DFly2 helper model(KV sharing); Indexer → DFly2 helper model(Position sharing); DFly2 helper model → Draft token block; Draft token block → Verified in one pass; Verified in one pass → Accepted tokensLong-context inputTarget modelSparse attention LLMKV cacheMaintained by targetmodelIndexerSelects positions perqueryDFly2 helper modelNo cache of its ownDraft token blockVerified in onepassPerformed by targetmodelAccepted tokensKV sharingPosition sharing
Reusing the target model's cache and selections The helper model builds drafts by directly reading the KV cache the target model has already built and the positions chosen by the indexer. The target model verifies the drafts in one pass.

Why it matters

In AI agent workloads that continuously handle long contexts, generation speed and GPU memory translate directly into operating costs. The researchers said that on DeepSeek-V4.1-Flash, GLM-5.3-Flash and Hy4 flash, more tokens were accepted per pass than with the existing draft models DFlash and DSpark trained the same way, and that the gap widened more on long-context and agent tasks than on general tasks. They also said that in a 64K-context evaluation of DeepSeek-V4.1-Flash, server-wide throughput rose by up to 81% at matched per-user speed, and that agent tasks on Hy4 flash ran up to 4.2x faster. All of these figures come from the developer's own comparisons.

Things to know (limitations)

DFly2 is built for sparse attention architectures, so it cannot be used as-is with standard attention models that attend to the full context. Because the helper model is paired with the target model's layers, separately trained weights are needed for each supported model. Performance was evaluated on a specific GPU (NVIDIA H20), so results may differ on other hardware or other tasks. Reports describe the speedup figures somewhat differently, so it is safer to measure on your own workload before adopting it.

Example

Consider a team serving a coding agent that keeps reading a large codebase as it works, using a sparse attention model such as Hy4 flash. With conventional speculative decoding, the helper model's cache grows with context length, reducing the number of concurrent requests a single GPU can handle. Tencent said it released the DFly2 code on GitHub and the helper model weights on Hugging Face, with support for the inference engines vLLM and SGLang. The team could attach the DFly2 helper model to its existing serving setup and test whether it can handle more requests with the same GPU memory while also improving response speed.

Where it came up on this site

Related terms

References