Skip to main content
Tencent's DFly2 architecture diagram illustrates KV cache reuse for faster speculative decoding in a 12B MoE model.

Editorial illustration for Tencent’s DFly2 Reuses KV Cache for Faster Speculative Decoding in 12B MoE

Tencent's DFly2 Speeds Up Sparse LLM Decoding

Tencent’s DFly2 Reuses KV Cache for Faster Speculative Decoding in 12B MoE

• 4 min read

Tencent's Hunyuan AI Infra team has open-sourced DFly2, a speculative decoding drafter built specifically for natively sparse large language models. The system targets DeepSeek-V4.1-Flash, GLM-5.3-Flash, and Tencent's own Hy4 flash, and it ships with an 0.85B-parameter, 5-layer drafter paired with Hy4 flash. Testing ran on NVIDIA H20 GPUs through vLLM with TP8 per instance, while Hy4 flash's default vLLM recipe calls for 8x H200.

Speculative decoding works by having a small drafter propose tokens that a larger target model verifies in a single pass, keeping output lossless while speeding things up. Long context breaks that math, though: a normal drafter has to attend over the entire prefix and keep its own KV cache, which gets expensive fast in agentic or long-context serving where memory is already under pressure from concurrency demands.

DFly2's fix is to strip the drafter of its own KV cache entirely. Across benchmarks, it beat same-recipe baselines DFlash and DSpark on draft acceptance for all three target models, with gains as high as 81% more throughput on DeepSeek-V4.1-Flash under a 64K SWE context. The paper behind it lays out exactly how that sharing works.

DFly2 speculative decoding targets models like DeepSeek-V4.1-Flash, GLM-5.3-Flash and Tencent’s own Hy4 flash. Its main approach is that the drafter keeps no KV cache of its own. This is important for long-context and agentic serving, where draft memory competes with concurrency.

Why this matters

For anyone serving long-context or agentic workloads, KV cache is the real bottleneck, not raw FLOPs. DFly2's bet, that a drafter can skip its own cache entirely and ride on the target model's sparse one, is a direct attack on that memory tax. A 0.85B, 5-layer drafter sitting in front of a 220B-total, 12B-active MoE like Hy4-flash only makes sense if the memory savings actually translate into more concurrent requests on the same H20 GPUs, not just faster single-stream latency.

That's the number worth watching once third parties run their own benchmarks. The fact that Tencent shipped this as default-on in the vLLM recipe, with day-one support in SGLang too, suggests they're confident enough to let it run unguarded in production-style serving, not just as a research toggle. For teams building on DeepSeek-V4.1-Flash, GLM-5.3-Flash, or Hy4 flash, this is a template worth copying: speculative decoding that scales with context length instead of fighting it for memory.

Common Questions Answered

How does DFly2's KV cache reuse approach differ from traditional speculative decoding drafters?

DFly2's drafter keeps no KV cache of its own and instead reuses the target model's sparse KV cache, which is a significant departure from conventional speculative decoding. This approach is particularly important for long-context and agentic serving scenarios, where draft memory would otherwise compete with concurrency on limited GPU resources. By eliminating the drafter's separate cache, DFly2 reduces overall memory consumption and allows for more concurrent requests on the same hardware.

What are the target models that DFly2 speculative decoding is designed to work with?

DFly2 is built specifically for natively sparse large language models including DeepSeek-V4.1-Flash, GLM-5.3-Flash, and Tencent's own Hy4 flash. The system ships with an 0.85B-parameter, 5-layer drafter that is paired with Hy4 flash for optimal performance. These models were selected because their sparse architecture aligns well with DFly2's memory-efficient speculative decoding approach.

Why is KV cache memory the primary bottleneck that DFly2 addresses rather than raw computational power?

For long-context and agentic workloads, KV cache memory consumption becomes the limiting factor for serving multiple concurrent requests, not the raw FLOPs of the GPU. DFly2's design directly targets this memory bottleneck by allowing a small 0.85B drafter to work with a 220B-total, 12B-active MoE model without requiring its own cache. This memory efficiency translates into the ability to serve more concurrent requests on the same H20 GPUs, rather than just improving single-stream latency.

What hardware and software setup was used for testing DFly2?

Testing of DFly2 ran on NVIDIA H20 GPUs through vLLM with tensor parallelism (TP8) per instance. The testing configuration was designed to evaluate the system's performance on the target sparse models while maintaining the memory efficiency benefits of the KV cache reuse approach.

LIVE05:16nexos.ai Platform Unites 200+ AI Models Behind a Single Governance Gateway