← Thursday, November 26 deck

02Open source1 source posting

Tencent Open Sources DFly2, a Speculative Decoder for Sparse Models That Raises DeepSeek V4.1 Flash Serving Throughput up to 81% at 64K Context

We just open-sourced a speculative decoder that speeds up sparse models like DeepSeek-V4.1-Flash, GLM-5.3-Flash, and our own Hy4 flash. At 64K context, DFly2 boosts DeepSeek-V4.1-Flash serving throughput by up to 81%. On Hy4 flash agentic tasks, it runs up to 4.2x faster, beating same-recipe DSpark by ~30% and accepting 10.4% more draft tokens than open-source DSpark. Under the hood, each draft layer reads directly from the target model's KV cache and top-k token selection, with no prefill required. That adds zero extra KV memory and keeps drafting cost flat at any context length. Try it on your own sparse models or grab the Hy4 flash weights below 馃憞 Code: t.co/XZXwgWpYXo Weights: t.co/vWagTOrbbQ Paper:

Diagram from the DFly2 paper: a frozen target model on the left passes its cached keys and values and its indexer's selected positions to three draft transformer blocks, which share that sparse cache and then pass through a hidden correction step to propose the next tokens.Three charts of throughput against per user decode speed on DeepSeek V4.1 Flash, comparing DFly2 with DFlash, DSpark and no speculation. DFly2 shows 28% more throughput on short text, 62% more on a 64K code task and 81% more on a 64K software engineering task.

Context

Why it matters

Long context serving is where sparse models like DeepSeek V4.1 Flash are slowest, so a free drafter that speeds them up without extra memory lowers the cost of running agents on open models.

Speculative decoding speeds up text generation by letting a small draft model propose several tokens that the large target model then checks in one pass, without changing the output. Newer long context models such as DeepSeek V4, GLM 5 and Tencent's Hy4 use natively sparse attention, where each layer attends only to a chosen set of past positions. Tencent published DFly2 with code on GitHub, weights on Hugging Face and a paper on arXiv.

Deep dive

Tencent AI said it has open sourced DFly2, a speculative decoder built for natively sparse models such as DeepSeek V4.1 Flash, GLM 5.3 Flash and its own Hy4 flash. In the post, Tencent said DFly2 boosts DeepSeek V4.1 Flash serving throughput by up to 81% at 64K context and runs up to 4.2x faster on Hy4 flash agentic tasks. It said DFly2 beats DSpark trained on the same recipe by about 30% and accepts 10.4% more draft tokens than the open source DSpark.

The key idea, according to the paper, is that a sparse target model already picks which positions in the context matter for each query. Instead of keeping its own cache of the prompt, each DFly2 draft layer reads the KV cache that its paired target layer already stored, at the positions that layer's indexer selected. Tencent calls these KV sharing and index sharing. Because the drafter runs no scoring pass and keeps no cache of its own, Tencent says it adds zero extra KV memory, needs no prefill and keeps drafting cost flat at any context length.

The paper reports that a selection made one step early still covers close to nine tenths of what later tokens select on DeepSeek V4.1 Flash. Across the three target models, DFly2's margin over the stronger baseline grows from 3.9% to 10.5% on general workloads to 10.0% to 31.5% on long context and agentic workloads of up to 128K tokens. Serving DeepSeek V4.1 Flash at high concurrency and matched per user speed, it delivered 62% and 81% more throughput than that baseline on long context and agentic sets at 64K.

These are Tencent's own results. The code is in the AngelSpec repository and the Hy4 flash weights are on Hugging Face. The post had about 110,000 views when this deck was updated.

What to expect next

Watch whether popular open serving engines add support for drafters that share the target model's sparsity, which would bring these gains to anyone running sparse DeepSeek or GLM models. Independent benchmarks on other hardware will show whether the throughput claims hold outside Tencent's setup. Also watch for DFly2 drafters trained for more sparse models, and for whether DeepSeek or Zhipu adopt similar methods in their own serving.