---
title: "What Is Tencent DFly 2? Speculative Decoding Explained"
url: "https://goremy.ai/blog/articles/tencent-dfly-2-speculative-decoding-explained"
author: Luis Chavez-Mattos
editor: Luis Chavez-Mattos
editor_title: Director, Product
published: "2026-11-28T17:00:22.744Z"
updated: "2026-11-28T17:00:22.744Z"
topic: AI Models & Industry
description: "Tencent says DFly 2 speeds up AI inference up to 4.2x by reusing the big model's attention notes. Here is how speculative decoding works."
---

# What Is Tencent DFly 2? Speculative Decoding Explained

> Tencent says DFly 2 speeds up AI inference up to 4.2x by reusing the big model's attention notes. Here is how speculative decoding works.

Edited by Luis Chavez-Mattos, Director, Product · Published 2026-11-28

## What is Tencent DFly 2?

Tencent DFly 2 is a method for making large AI models write their answers faster. Tencent says it speeds up inference (the work a model does when it generates a response) by up to 4.2 times. It belongs to a family of techniques called speculative decoding, where a small, cheap "drafter" guesses several words ahead and the big model checks the guesses. DFly 2's twist is that its drafter does not keep its own memory of the conversation. It reuses notes the big model has already made.

## TL;DR

- **DFly 2 is a speed technique, not a new chatbot.** It changes how an existing large model produces text, and the big model still has the final say on every word.
- **Speculative decoding** works because checking several guesses at once costs about the same as generating one word, so correct guesses are nearly free.
- **The new idea is borrowing the big model's notes.** Many drafters keep a second memory of the conversation, which takes GPU space. DFly 2 reads the big model's own selected positions instead.
- **It only works with natively sparse models,** meaning models that already pick a subset of earlier text to look at.
- **The headline numbers are Tencent's own.** In one test, writing speed was 3.41x versus 2.63x for a rival method, but the whole request (including reading your prompt) was 1.67x versus 1.55x.
- **You cannot try this casually.** Running it takes a multi-GPU server, so its impact on most people will come indirectly, through the AI products they use.

## Why are AI models slow at writing?

A large language model writes one token at a time. A token is a small chunk of text, often a word or part of a word. To produce each token, the whole giant model has to run a full pass. Three tokens means three passes. Five hundred tokens means five hundred passes.

That is why a long answer streams onto your screen gradually instead of appearing at once. The model cannot skip ahead, because each new token depends on the ones before it.

This matters more as AI is used for longer jobs. A coding agent that reads a big codebase and writes pages of changes, or a assistant that holds a long conversation, spends most of its time waiting on this one-token-at-a-time loop. Anything that speeds it up makes those tools feel faster and can lower the cost of running them.

## How does speculative decoding work?

Speculative decoding splits the job between two models:

1. **The drafter** is small and fast. It guesses the next several tokens, for example five.
2. **The verifier** is the big, accurate model. It checks all five guesses in a single pass.
3. **Correct guesses stay.** At the first wrong guess, the big model puts in its own token and drops the rest of the draft.

Think of a junior colleague drafting the next paragraph of a report while a senior editor reads the whole paragraph in one go. The editor keeps everything up to the first mistake, fixes it, and the junior starts again from there. The editor reads one paragraph at a time instead of one word at a time.

In the example used to explain DFly 2, three passes of the big model yield 15 tokens instead of three. Real results vary, because the drafter and the checking step take time too. But the output is still what the big model would approve, so quality is protected. You are trading a little extra work for fewer slow passes.

The whole trick depends on the drafter being good and cheap. A drafter that guesses badly wastes passes. A drafter that is expensive to run eats the savings.

## What does DFly 2 do differently?

To guess well, a drafter needs to know what came before. Most drafters solve this by keeping a second memory of the conversation. That memory takes up space on the GPU (the specialized chip that runs AI models), and it grows as the conversation grows.

DFly 2 asks a simple question: the big model has already taken notes on this conversation, so why write them again?

It works with models that are natively sparse. Normally, a model "looks back" over earlier text through a mechanism called attention. Sparse attention means that in certain layers the model does not reread everything. It picks particular earlier positions that matter most and focuses on those. DFly 2's drafter reads those picks and goes straight to the positions the big model already chose.

An analogy: you borrow a classmate's notebook that already has the important lines highlighted, instead of rereading the whole textbook and making your own notes.

There is a useful side effect. As the conversation gets longer, the number of positions DFly 2 reads stays fixed. That is a good property for long documents and long agent sessions, where a drafter's own memory would otherwise keep growing.

## How does DFly 2 compare with other drafting methods?

DFly 2 sits in a crowded field. This summary follows the comparison Tencent's materials make:

| Method | How it drafts | Memory |
|---|---|---|
| MTP and Eagle 3 | One token after another | Keeps its own memory of the context |
| D Flash | A whole block at once | Keeps its own memory |
| D Flash 2 | Keeps 16 candidates at each position, then picks a path that fits together | Keeps its own memory |
| DSpark | A block, plus a small step-by-step pass so each guess accounts for the previous one | Own memory covers only a recent window, so it cannot reach far back |
| DFly 2 | A block at once | Builds none. Reads the big model's selected positions, including ones from much earlier |

One note on names: D Flash 2 and DFly 2 look similar but are separate projects.

## How fast is DFly 2, really?

The "up to 4.2x" figure is a ceiling, not an average. The more detailed numbers come from Tencent's paper, summarized here as reported by a creator who walked through it. He did not test them independently.

**Single user, agent tasks.** Averaged over four agent tests on one model, one request at a time:

- Writing speed: DFly 2 reached 3.41x, compared with 2.63x for DSpark. That is roughly 30% faster.
- Whole request, including processing your prompt: DFly 2 reached 1.67x versus 1.55x for DSpark. It still leads, but the gap is much smaller.

**Busy server, many users.** At the same writing speed per user, DFly 2 delivered more total output than DSpark:

- 28% more on short text
- 62% more on long code
- 81% more on a coding agent test

The pattern is that longer workloads showed bigger gains. That fits the design, since the approach avoids the memory cost that grows with length.

The lesson for reading any AI speed claim: ask whether the number covers only the writing, or the full wait from pressing enter to getting the finished answer. Those can differ a lot.

## What are the catches?

- **It needs a natively sparse model.** DFly 2 relies on the big model having sparse attention layers. It is not a bolt-on for any model.
- **The results are Tencent's.** The paper compares DFly 2 against DFlash and DSpark versions that Tencent trained itself using the same recipe. It does not compare against MTP, Eagle 3 or D Flash 2 in these results, so there are no numbers for those.
- **It is hardware-heavy.** Running it yourself would take a multi-GPU cluster, at least eight GPUs with 80 GB of memory each, according to the creator who covered it.
- **Gains vary by workload.** Short, single-user chats see smaller improvements than long code and agent sessions.

## What does this mean for you?

Most readers will never run DFly 2. The effect reaches you through the tools you use and buy.

**If you use AI at work,** expect the industry's direction to be faster responses for long tasks like code review, document analysis and agents that work through many steps. Research like this is part of why those tasks keep getting cheaper to run, though no source here says when or whether any product you use will adopt it.

**If you evaluate or buy AI tools,** ask vendors what a speed claim measures. "Faster generation" and "faster end to end" are different promises. Ask for numbers on workloads like yours, ideally long ones if you use agents.

**If you manage a technical team,** note the trade-off. A method that depends on sparse models only helps if you run, or plan to run, that kind of model.

**If you are not technical,** the useful takeaway is the pattern. Many AI speedups come from not repeating work. Here, the drafter reuses the big model's notes instead of making its own.

## Can I build a small tool to track which AI models my team uses?

Speed claims are only one input when choosing a model. Cost, quality and response time on your own tasks matter just as much, and that data usually ends up in a spreadsheet. With [Remy](https://goremy.ai), you could describe a simple internal tracker in plain English: a form where teammates log which model they used for which task, how long it took and whether the result was good, plus a dashboard that summarizes it. Remy builds and deploys it as a full-stack app, and its apps can call nearly 400 AI models, so the same tool could also run side-by-side tests on your own prompts.

## Frequently Asked Questions

### Does DFly 2 change the answers an AI gives?

According to the explanation of the method, the big model still has the final say. It checks the drafter's guesses and replaces the first wrong one with its own token. The drafter only proposes. That is the core idea of speculative decoding.

### Is DFly 2 the same as D Flash 2?

No. Despite the similar names, they are separate projects. D Flash 2 keeps 16 candidates at every position and picks a path through them that fits together. DFly 2 is about reusing the big model's own selected attention positions.

### Can I run DFly 2 on my own computer?

Not realistically. The creator who covered it said you would need a multi-GPU cluster of at least eight GPUs with 80 GB of memory each. It is aimed at people who serve large models, not at laptop users.

### Is the 4.2x speedup guaranteed?

No. It is the top end of Tencent's own reported results. In the averaged agent tests, writing speed reached 3.41x, and the whole request, including prompt processing, reached 1.67x. These numbers have not been independently verified here.

### Why does this matter for AI agents?

Agents deal with long code and long conversations, where a drafter's own memory would grow. DFly 2 reads a fixed number of positions as the conversation grows, and Tencent's tests showed bigger gains on longer workloads, such as 81% more total output on a coding agent test.
