AIGenerated
EN · IT · ES

Tencent open-sources DFly2, boosting long-context AI throughput by up to 81%

A new tool from Tencent lets AI models handle very long chats and documents without adding extra memory or slowing down when many users ask questions at once.

A developer's workstation moments after Tencent makes its DFly2 inference tool publicly available on an open-source code repository. (AI illustration)
Illustration: Herald of AI, generated with AI
How it works

A free helper program that makes long AI answers come faster by guessing words ahead without extra memory.

  1. Main AI reads long chat, picks key parts
  2. Helper guesses several words ahead, no extra memory
  3. Main AI checks all guesses in one pass
  4. More users get faster replies, no new hardware

What you could do with it

  • A serving engineer could run DFly2 alongside DeepSeek-V4.1-Flash or Hy4 flash for many simultaneous users, getting up to 81 % more throughput without adding hardware 2.
  • A developer building a long-document reading app could pair DFly2 with a natively sparse model so the helper's memory cost stays flat whether the conversation is 2,000 or 64,000 words 1.
  • A team running multi-step agentic tasks over very long documents could use DFly2 to gain a 10 % to 31.5 % speed advantage over earlier helpers on those workloads 1.

What the problem is

Modern AI models like DeepSeek-V4.1-Flash and Tencent's own Hy4 use what the paper calls "natively sparse" attention: when a conversation gets very long, the model does not re-read every single word. It picks a smaller set of relevant parts to look at, saving time. 1

But a trick called speculative decoding, which makes the model answer faster, usually needs a small helper (the "drafter") to do its own guessing. That helper has to keep its own memory of the conversation, which adds cost. The more users are served at the same time, or the longer the conversation, the more memory and waiting time that extra cache eats up. 12

At a glance

How much faster DFly2 is than the previous best helper

  • Everyday tasksup to 10.5%
  • Long documentsup to 31.5%
  • Many users at onceup to 81%

Tencent's tests on DeepSeek-V4.1-Flash, GLM-5.3-Flash, and Hy4 flash; advantage over the stronger of two earlier helpers

How DFly2 fixes it

DFly2, built by Tencent's Hunyuan AI Infra team, is a 0.85-billion-parameter, 5-layer helper that does not keep its own memory at all. 2 Instead, each of its five layers borrows two things from the main model it helps:

  • It reads the main model's own cached memory (called KV sharing), so no second copy is stored.
  • It looks only at the same positions the main model already decided were relevant (called Index sharing), so it does not waste time scanning the whole conversation.

The result is that the helper's cost stays roughly flat whether the conversation is 2,000 words or 64,000 words. Each draft token attends to at most about 2,000 keys, no matter how long the full context is. 2

The team also measured that a "which parts to read" decision made one step early still covers close to 90% of what later words would need on DeepSeek-V4.1-Flash. A simple sliding-window approach of the same size recovers less than 20%. 12

The speed numbers

Tencent tested DFly2 against two earlier helpers, DFlash and DSpark, on three target models: DeepSeek-V4.1-Flash, GLM-5.3-Flash, and Hy4 flash. 12

  • On everyday ("general") tasks, DFly2 accepted more guessed tokens per step, beating the stronger rival by 3.9% to 10.5%.
  • On long-context and agentic tasks (where the model works through very long documents or multi-step instructions), the advantage widened to 10.0%–31.5%.
  • Under heavy load (many users at once) on DeepSeek-V4.1-Flash, at the same per-user speed, DFly2's throughput was 62% higher on one 64,000-token test set and 81% higher on another. 12

The smallest gain the team reported was 3.9% over DSpark on Hy4 flash for general tasks at temperature 0 (the most deterministic setting). 2

Serving tests ran on NVIDIA H20 GPUs with the vLLM framework, 8 GPUs per instance. Hy4 flash's default vLLM recipe calls for 8 H200s. 2

What changes for developers

Because the tool is open-sourced alongside the paper (arXiv 2611.34776, submitted 25 November 2026), engineers can plug DFly2 into their serving stack without writing the helper from scratch. 12 For a company running a long-context model behind many users, skipping the extra cache means fewer GPUs waiting, or the same GPUs handling more people at the same speed. For a user, the practical upshot is a shorter wait when asking a model to summarise a 64-page report or run a multi-step coding task.

The paper does not report accuracy changes: speculative decoding is designed so the final output is identical to what the main model would have produced on its own. The gain is purely in speed and resource use. 1

How good is it

According to Tencent, DFly2 was tested against DFlash and DSpark on three target models—DeepSeek-V4.1-Flash, GLM-5.3-Flash, and Hy4 flash—across general, long-context, and agentic benchmarks. On general tasks it accepted 3.9 % to 10.5 % more guessed tokens per step than the stronger rival; on long-context and agentic tasks that gap widened to 10.0 % to 31.5 % 12. At high concurrency on DeepSeek-V4.1-Flash, holding each user's decode speed constant, DFly2 delivered 62 % and 81 % higher throughput on two 64K test sets . The smallest gain was 3.9 % over DSpark on Hy4 flash general tasks at temperature 0 .

Key facts

  • DFly2 is a 0.85B-parameter, 5-layer drafter from Tencent's Hunyuan AI Infra team, open-sourced with the paper (arXiv 2611.34776, 25 Nov 2026).
  • It keeps no KV cache of its own; each draft layer borrows the paired target layer's cached memory and index selection.
  • On long-context and agentic workloads it beats the stronger of DFlash and DSpark by 10.0%–31.5% in accepted tokens per step.
  • At high concurrency on DeepSeek-V4.1-Flash, throughput is 62% and 81% higher on two 64K-token sets at matched per-user speed.
  • Each draft token attends to at most ~2,000 keys, so drafting cost stays roughly flat at any context length.

Sources

  1. DFly2: Turbocharging Long-Context Speculative Decoding by Sharing the Target's Sparsity
  2. Tencent Open-Sources DFly2: Speculative Decoding That Reuses the Target's Sparse KV Cache — marktechpost.com

If this story concerns you or your company, or uses something that belongs to you, ask for a correction or for it to be taken down. How requests work

Keep reading