Last updated: 28 November 2026

On 25 November 2026, a team of Tencent researchers posted a paper on arXiv describing DFly2, a new speculative decoding drafter built for a fast-growing family of “sparse attention” language models such as DeepSeek-V4.1-Flash, GLM-5.3-Flash and Tencent’s own Hy4 flash. The training code sits in Tencent’s open-source AngelSpec framework, and a ready-made DFly2 drafter already ships inside the Hy4 flash weights on Hugging Face. Within a day, Tencent’s headline claims (up to 81% more serving throughput on DeepSeek-V4.1-Flash at 64K context, and “up to 4.2x” faster agentic tasks on Hy4 flash) were all over AI newsletters.

DFly2 is not a chatbot or a model you talk to. It is plumbing: a small helper network that lets a big model produce text faster without changing what the big model would have said. That is exactly why I think it deserves attention. In 2026, the cost of AI is increasingly the cost of inference, that is, running models for millions of users, and most of the clever engineering is happening there rather than in headline model launches.

In this post I explain what speculative decoding is, what DFly2 changes, what the paper and independent write-ups actually show, where the headline numbers get shaky, how to try it with the official recipe, and why I think every CS, GATE DA and data science student in India should understand this idea.

Quick summary

  • What it is: A 5-layer, roughly 0.85 billion parameter “draft model” that guesses several next tokens at once so a large target model can check them in one go.
  • Who made it: Tencent’s Hy (Hunyuan) team. The paper, DFly2: Turbocharging Long-Context Speculative Decoding by Sharing the Target’s Sparsity, lists 13 authors and was submitted to arXiv on 25 November 2026.
  • The key idea: Instead of keeping its own memory (KV cache), DFly2 borrows the target model’s KV cache and the positions the target’s sparse attention has already chosen to look at.
  • Works with: Natively sparse attention models. The paper tests DeepSeek-V4.1-Flash, GLM-5.3-Flash and Hy4 flash. Ordinary dense models are not the target.
  • Headline results (company-run): 62% and 81% higher high-concurrency throughput on two 64K-context test sets for DeepSeek-V4.1-Flash; acceptance gains over the strongest baseline of 3.9% to 10.5% on general tasks and 10.0% to 31.5% on long-context and agentic tasks.
  • Licences: AngelSpec training code is Apache-2.0. The drafter bundled with Hy4 flash falls under the Tencent Hy License, which is not a standard open-source licence.
  • Reality check: No independent reproduction yet, the baselines were trained by Tencent itself, and running it needs a multi-GPU data-centre server.

First, what is speculative decoding?

Large language models generate text one token at a time. For each new token, the model has to read its entire set of weights (and its memory of the conversation so far) from GPU memory. On modern GPUs, that reading, not the arithmetic, is usually the bottleneck. The chip spends a lot of time waiting for data.

Speculative decoding, introduced in 2022 by Yaniv Leviathan, Matan Kalman and Yossi Matias at Google (and developed in parallel by a DeepMind team), turns that waste into an opportunity:

  1. A small, cheap draft model quickly guesses the next few tokens, say five.
  2. The large target model checks all five guesses in a single forward pass, which costs roughly the same memory traffic as generating one token.
  3. Every guess that matches what the target would have produced is accepted. At the first wrong guess, the target substitutes its own token and the process repeats.

If the drafter is good, you get several tokens for the price of one target step. If it is bad, you lose a little time on wasted drafts. With the correct acceptance rule, the final output follows exactly the same distribution as the target model alone, so speculative decoding is a speed trick, not a quality trade-off. The key number engineers watch is the acceptance length: how many tokens, on average, get accepted per target step.

A neat result from the original Google paper is worth knowing for exams. If each drafted token is accepted with probability α (assumed independent) and you draft γ tokens, the expected number of tokens produced per target step is (1 − αγ+1) / (1 − α). With α = 0.8 and γ = 5, that is about 3.7 tokens per step. This is a geometric series, straight out of your probability syllabus.

What problem does DFly2 solve?

Classic drafters have a hidden cost at long context. A drafter needs its own memory of the conversation (its own KV cache) to make good guesses. At 64,000 tokens or more, that cache becomes large, eats GPU memory that could serve other users, and every draft token has to attend over the whole history.

Meanwhile, a new generation of models uses sparse attention. Instead of looking at every previous token, each layer has a small “indexer” that picks a limited set of the most relevant positions (up to 2,048 in Hy4 flash) and attends only to those. DeepSeek’s V4 line popularised this approach for million-token contexts.

Tencent’s insight is that a drafter for such a model does not need to repeat that work. The paper reports that a selection made one step early covers “close to nine tenths” of what later tokens select on DeepSeek-V4.1-Flash. In other words, the positions the target just chose are almost exactly the ones the drafter needs too.

How DFly2 works

According to the arXiv abstract and the Hy4 flash model card, DFly2 combines three ideas:

  • Block-parallel drafting: Rather than guessing one token after another (as EAGLE-style drafters do), DFly2 proposes a whole block of tokens in parallel, similar to the earlier DFlash approach. This keeps drafting cheap.
  • KV sharing: Each of the drafter’s 5 layers is paired with a layer of the target model and reads that layer’s KV cache directly. The drafter keeps no cache of its own.
  • Index sharing: Each draft layer also reuses the target indexer’s choice of up to 2,048 positions, so it does not need its own scoring pass to decide where to look.

The paper’s own summary is blunt: DFly2 “runs no scoring pass and keeps no cache of its own.” The model card adds that this gives a roughly constant cost per draft token (about 2,000 keys regardless of how long the context grows) and zero extra KV memory. DFly2 is not involved in the prefill stage (reading your prompt); it only speeds up the decode stage (writing the answer).

The training side lives in AngelSpec, Tencent’s open-source framework for training draft models. Its README lists support for seven drafter types, including DFly2, DFly, DFlash, DFlare, EAGLE-3, DSpark and MTP, and records that version 0.2.0, which added DFly2 training, was released on 18 November 2026.

What the numbers say

Here are the main reported results. Note where each figure comes from, because they are not all equally solid.

Claim Figure Source
Acceptance gain over stronger baseline (DFlash or DSpark, same training recipe), general workloads 3.9% to 10.5% arXiv abstract
Same, long-context and agentic workloads 10.0% to 31.5% arXiv abstract
High-concurrency throughput on DeepSeek-V4.1-Flash, matched per-user decode speed, two 64K test sets +62% and +81% arXiv abstract
Hy4 flash agentic tasks “Up to 4.2x” faster Tencent announcement
Hy4 flash decode speed with DFly2, megakernels and 4-bit quantisation combined Over 150 tokens per second Hugging Face model card

An independent breakdown by Sulat AI & Tech News, which went through the paper’s tables, adds useful context. By its reading, on Hy4 flash (greedy decoding, batch size 1, NVIDIA H20 GPUs, vLLM), DFly2 beat DSpark on every task group, but the gap was largest on decode speed alone. For agentic tasks, it reports a decode speed-up of 3.41x for DFly2 against 2.63x for DSpark, while the whole-request speed-up (which includes reading the prompt) was only 1.67x against 1.55x. It also notes that the “4.2x” headline figure does not appear in the paper’s tables. I could not confirm these table values myself from the full paper, so treat them as one careful reader’s reporting.

My take: the architectural idea is elegant and the abstract’s numbers are plausible, but “4.2x faster” in a social media post and “1.67x faster per request” in a table describe very different user experiences. When an agent reads a 64K-token codebase, much of the waiting is the prefill, which DFly2 does not touch.

How to try it (official method)

Be realistic: this is data-centre software. The official vLLM recipe for Hy4 flash defaults to a server with 8 NVIDIA H200 GPUs, lists Hopper or Blackwell data-centre GPUs (or AMD MI355X/MI350X) as supported, and needs plenty of host RAM because Hy4 flash’s Engram tables are offloaded to CPU memory. There is no laptop version.

The Hy4 flash model card gives this vLLM Docker command, with DFly2 switched on through the speculative config:

docker run --gpus all -p 8000:8000 --ipc=host \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  vllm/vllm-openai:hy4-flash tencent/Hy4-flash-FP8 \
    --tensor-parallel-size 8 \
    --speculative-config '{"num_speculative_tokens":5,"method":"dfly"}' \
    --attention-backend FLASHMLA_SPARSE \
    --tool-call-parser hy_v4 \
    --reasoning-parser hy_v4 \
    --enable-auto-tool-choice \
    --port 8000 \
    --served-model-name hy4-flash

For SGLang, the card uses the lmsysorg/sglang:hy4-flash image with --speculative-algorithm DFLY and --speculative-dfly-block-size 6. The vLLM recipe page states that DFly speculative decoding is on by default for this model and that pip-installed vLLM does not yet support it, so use the Docker image.

To train your own DFly2 drafter, the AngelSpec README installs with pip install -e ".[vllm]" plus the Mooncake transfer engine, and its example scripts assume 8 GPUs (4 for inference, 4 for training). Check the current README before you start, because the project says more models and images are “coming soon”.

For students without a GPU cluster, the honest path is to read the paper, study the AngelSpec code, and experiment with speculative decoding on small open models using the built-in support in vLLM or Hugging Face Transformers on a free cloud notebook.

Limits and open questions

  • No independent reproduction yet. Every benchmark so far was run by Tencent, and the DFlash and DSpark baselines were trained by Tencent on its own recipe. Third-party numbers may differ.
  • Sparse models only. The whole trick depends on borrowing a sparse indexer’s choices. Dense-attention models, which are still the majority of open models, are not supported.
  • Decode only. There is no prefill speed-up, so long-prompt tasks see smaller whole-request gains.
  • Narrow test conditions. Per Sulat’s reading, the Hy4 flash results are at batch size 1 with greedy decoding, and the high-concurrency load test was only run on DeepSeek-V4.1-Flash.
  • Conflicting deployment claims. The model card says DFly2 is “PD-disaggregation ready” (separating prefill and decode onto different servers), while Sulat reports that the current vLLM and SGLang integrations reject that mode, and that SGLang supports only greedy sampling with DFly. Both can be true: the design may allow it while today’s engine code does not.
  • Small reporting differences. TechNode describes Hy4 flash as about 224 billion parameters; the Hugging Face card says 220 billion total (including 64 billion Engram parameters) with about 12 billion active. One report said the recipe needs 8x H200 while the paper’s Hy4 flash tests reportedly used H20 GPUs. These are different setups, not necessarily contradictions.

Licence, privacy and the India angle

This is general information, not legal advice.

Two different licences apply. AngelSpec’s code is Apache-2.0 (with some third-party MIT and Apache components), which is permissive and fine for learning and commercial work. The DFly2 drafter that ships with Hy4 flash is covered by the Tencent Hy License, the same licence as the model weights. Custom model licences often include usage restrictions and thresholds for large commercial deployments, so any Indian startup or college lab planning a product should read the licence text on Hugging Face carefully rather than assume “open weights” means “open source”.

On privacy, speculative decoding itself changes nothing: it runs entirely inside your own inference server. The bigger point is that cheaper self-hosting makes it more practical for Indian companies, hospitals or universities to keep sensitive data on their own infrastructure instead of sending it to a foreign API, which can help with obligations under the Digital Personal Data Protection Act, 2023. As always, where the model comes from and how it was trained are separate questions worth asking.

Why this matters for Indian students and educators

I like DFly2 as a teaching example because it is a small idea built on fundamentals you already study:

  • Probability and Statistics (GATE DA): acceptance rates, the geometric series behind expected acceptance length, and rejection sampling, which keeps the output distribution exact.
  • Machine Learning and Deep Learning: transformers, attention, KV caches, knowledge distillation (drafters are trained to imitate the target) and Mixture-of-Experts models.
  • Computer Organisation and Architecture: why LLM decoding is memory-bandwidth bound, and why doing more arithmetic per byte read is the whole game.
  • Operating Systems and Algorithms: caching, reuse and the trade-off between speculation and wasted work, the same pattern as branch prediction in CPUs.
  • Systems careers: inference engineering (vLLM, SGLang, CUDA kernels, quantisation) is one of the most in-demand AI skill sets. India’s AI startups and the IndiaAI compute programme both depend on serving models cheaply, and people who understand this layer are scarce.

A good mini-project: take a small open model pair (for example a 0.5B drafter and a 7B target from the same family), enable speculative decoding in vLLM or Transformers, and measure acceptance length and speed on short chat prompts versus long documents. Then compare your measurements with the formula above. You will learn more from that one experiment than from ten benchmark tables.

For context on the models DFly2 targets, see my earlier explainers on Tencent Hy4 and DeepSeek V4.1 Flash 1017.

Frequently asked questions

Does DFly2 make the model smarter or change its answers?

No. Speculative decoding only changes speed. With the proper acceptance rule, the output matches what the target model would have produced on its own. Quality depends entirely on the target model.

Can I use DFly2 with Llama, Qwen or other dense models?

Not as designed. DFly2 relies on borrowing a sparse attention indexer’s selections, so it targets natively sparse models such as DeepSeek-V4.1-Flash, GLM-5.3-Flash and Hy4 flash. For dense models, established methods like EAGLE-3 or MTP drafters are the usual choice.

Is DFly2 open source?

Partly. The AngelSpec training framework is Apache-2.0 on GitHub. The trained drafter bundled with Hy4 flash is under the Tencent Hy License, a custom model licence.

Is it really 4.2x faster?

That is Tencent’s peak single-task claim for Hy4 flash agentic work. The paper’s abstract reports 62% to 81% higher throughput at 64K context on DeepSeek-V4.1-Flash, and an independent reading of the tables suggests whole-request gains on Hy4 flash are much smaller than decode-only gains. Real-world speed will depend on your workload.

Can I run it on my laptop or a free Colab GPU?

No. The official recipes assume an 8-GPU data-centre server. You can, however, learn speculative decoding itself on small models with free resources.

Is this topic relevant for GATE DA?

GATE will not ask about DFly2 by name, but the underlying concepts (probability, expected values, attention, caching, memory hierarchy) are core syllabus material, and this is a great real-world example to make them stick.

The bottom line

DFly2 is a clever, focused piece of engineering: once models learn to look at only a few thousand relevant tokens, the helper that drafts for them can simply reuse that choice and skip its own memory entirely. The paper’s numbers are promising, especially for long-context and agent workloads, but they are company-run, limited to sparse models, and the most-shared “4.2x” figure is a best case. For students, the real lesson is not the headline speed-up but the method: find where the hardware is waiting, and reuse work that has already been done. That habit of thinking will outlast any single model release.

Sources and further reading

Written by Piyush Wairale (M.Tech, IIT Madras), founder of PiyushAI Edtech. Benchmark figures are as reported by Tencent and the cited sources on or before 28 November 2026 and have not been independently reproduced.

Share This Story, Choose Your Platform!
Join the PiyushAI AI & Data Science Community | Newsletter
📬 PiyushAI  ·  AI & Data Science Learning Community

Stay Ahead in AI, Data Science, Exams & Your Learning Journey

Join 20,000+ learners exploring AI & Data Science — GATE, Bank IT & PSU exam aspirants, IIT Madras BS Degree students, school teachers exploring the CBSE CT & AI curriculum, working professionals, and anyone starting their AI literacy journey. Tell us a little about yourself and get personalised updates, resources, and mentorship alerts — straight from Piyush Wairale.

🎯
Exam & Career Updates First
GATE, Bank IT Officer, PSU & Government job alerts — plus IIT Madras BS Degree guidance.
📚
Free Learning Resources
Study notes, PYQ analysis, practice questions & guides for exams, data science & AI.
🚀
AI Literacy & CBSE CT-AI
AI tools & concepts for everyone, CBSE CT & AI curriculum support for schools & teachers, plus early course access.
✍️ Join the Community — Fill the Form

Takes less than 60 seconds  •  No spam, only what helps you learn & grow

👨‍🎓 20,000+ Students
▶️ 44,000+ YouTube Subscribers
🎓 IIT Madras Alumnus Mentor

Recent Post

Connect with PiyushAI | YouTube & Telegram Community
🔗 Connect With Us

Learn Daily, Wherever You Are

Free lectures, exam updates, PYQ discussions, and job alerts — delivered through our YouTube channel and Telegram communities.

▶️
YouTube Channel
Piyush Wairale IITM
Free lectures on AI, Data Science, GATE preparation & exam strategy — trusted by 44,000+ subscribers.
Subscribe Now →
🌐
Official Website
piyushwairale.com
Complete courses, GATE DA test series, mock exams & structured preparation programs — all in one place.
Explore Courses →

Leave A Comment