PaperarXiv:2611.34776 · cs.CL · Nov 25, 2026
DFly2: Turbocharging Long-Context Speculative Decoding by Sharing the Target's Sparsity
Hong Liu, Rui Cen, Junhan Shi, Lin Niu, Runzhi Fan, Zhaojing Zhou, Haodi Lei, Jiebin Zhang, Saiyong Yang, Junqiang Zheng, Zhenghai Xue, Guanghua Yu, + 1 more
Accepted-length gains versus same-recipe DFlash and DSpark are consistent in the printed tables, but they are a small serving delta, the abstract's turbocharging throughput is one Pareto curve on one model against in-house baselines, and none of this is a tool loop, memory, or eval component.
Novelty
3 out of 5Rigor
2 out of 5Reproducibility
2 out of 5Relevance to harnesses
1 out of 5
TL;DR
DFly2 is a block-parallel speculative drafter that reuses a natively sparse target's KV and indexer top-k and keeps no cache of its own. Accepted-length gains versus same-recipe DFlash and DSpark are real; the abstract's 62% and 81% throughput lines are not a general or harness speedup.
Adversarial review by Harness Hub · Nov 28, 2026 · read full text (truncated) · Suggest a correction
Original abstract (authors’ text, select to expand)
To avoid the quadratic cost of dense attention over long contexts, models such as DeepSeek-V4 and Hy4 have turned natively sparse, and speculative decoding, which matters most where decoding is slowest, increasingly runs on them. Their drafters, however, still keep a context cache of their own, over the whole prompt or a sliding window. Beyond memory, such a cache costs prefill time, prefix-cache hits and decode concurrency. Drafters that read the target's cache avoid one of their own, but settle only which cache, not which positions, and still read everything or a recent window. Neither rule is made for the query at hand, and computing a selection per query in the drafter would cost more as the context grows. Yet a natively sparse target already picks positions for each query, over a cache it keeps anyway. Both of the drafter's choices are therefore already made, and paid for, by the target: its cache and its selection. We measure how far one selection carries: made a step early, it still covers close to nine tenths of what each later token selects on DS-V4.1-Flash. We present DFly2, a block-parallel drafter that shares the target's sparsity. Each draft layer reads the KV its paired target layer cached (KV sharing), at the positions that layer's indexer selected, a fixed number anywhere in the context (Index sharing). DFly2 thus runs no scoring pass and keeps no cache of its own. On DS-V4.1-Flash, GLM-5.3-Flash and Hy4~flash, whose sparse attention and architecture differ, it accepts more tokens per step than DFlash and DSpark trained on the same recipe, over general, long-context and agentic benchmarks. Its margin over the stronger baseline widens from 3.9%-10.5% on general workloads to 10.0%-31.5% on long-context and agentic ones. At high concurrency on DS-V4.1-Flash, at matched per-user decode speed, its throughput is 62% and 81% higher on two 64K sets.
Authors’ note
20 pages, 8 figures
Filed undermemoryevaluationagents
Summary
DFly2 pairs three draft layers with DSA layers, reads those layers' cached latents at the previous-step top-k plus a near window, and adds last-layer hidden injection plus an intra-block correction. It is trained on the same 32K recipe as reimplemented DFlash and DSpark and evaluated on DS-V4.1-Flash, GLM-5.3-Flash, and Hy4 flash. Mean accepted length is higher in the printed Table 6 and Table 7 cells, with larger relative gaps on long prompts, but concurrency-1 decode and end-to-end gains are much smaller than the abstract's high-concurrency throughput claims, and the method is a serving change, not a harness component.
Key findings
- Section 3.3: on DS-V4.1-Flash, a selection made one step early covers close to nine tenths of later-token top-k mass over 158,638 blocks; a same-size window stays at 0.13–0.17 (Figure 3).
- Table 6 overall τ (T=0/1): DS-V4.1-Flash DFly2 4.12/3.88 vs DSpark 3.81/3.51; GLM-5.3-Flash 3.96/3.69 vs 3.68/3.35; Hy4 flash 3.96/3.95 vs 3.81/3.73. Those stronger-baseline ratios sit in the abstract's 3.9%–10.5% general band.
- Table 7 group τ at T=0, long/agentic: DS-V4.1-Flash DFly2 3.74/4.06, GLM-5.3-Flash 3.85/4.03, Hy4 flash 3.63/4.11. The abstract's 10.0%–31.5% band is the spread of those family averages versus the stronger of DFlash and DSpark, including Hy4 agentic T=0.9 (3.88 vs DSpark 2.95).
- Section 5.3: concurrency-1 decode is 2% to 6% faster on general workloads, 6% to 18% on long-context, and 12% to 30% on agentic. Table 8 DS-V4.1-Flash overall decode/e2e is 3.14/2.97× for DFly2 versus 2.96/2.82× for DFlash.
- Section 5.3 and Figure 7: at matched per-user decode speed versus self-trained DSpark, throughput is 28% higher on short text and 62% and 81% higher on CodeSpan 64K and SWE 64K, DS-V4.1-Flash only, greedy, H20. No absolute tok/s is printed.
- Table 10: dropping the target top-k on DS-V4.1-Flash cuts mean τ from 3.57/3.62/3.75 to 3.14/2.76/2.95 (gen/long/agen, four sampling settings). Own-cache ablation is 3.46/3.34/3.37 on the same columns.
The paper at a glance
- Verify pass writes target KV and the indexer top-k at row A-1
- Three draft layers read paired-layer latents at that fixed index set
- Intra-block correction rereads the shared positions slot by slot
- Target verifies the γ=5 block and appends the bonus token
Why it matters
This paper is irrelevant to harness builders. It does not change tool loops, memory, routing, or evals. It is a speculative-decoding change for servers that already run natively sparse targets (DS-V4.1-Flash, GLM-5.3-Flash, Hy4 flash). A harness benefits only if that serving stack is already in place and a drafter can be trained into it. The abstract's 62% and 81% figures are not an agent-harness speedup; they are one-model, high-concurrency throughput gaps against the authors' own DSpark.
Issues (5)
- High severityWhere in paper: Abstract; Section 5.3; Figure 7
The abstract's 62% and 81% throughput gains are not a general result. Section 5.3 and Figure 7 report them only for DS-V4.1-Flash, greedy, on H20, versus self-trained DSpark at matched per-user decode speed on CodeSpan 64K and SWE 64K. The same section's concurrency-1 decode gains over the stronger baseline are 2% to 6% on general workloads, 6% to 18% on long-context, and 12% to 30% on agentic. No absolute tok/s, matched speed, or concurrency for those two points is printed, GLM-5.3-Flash and Hy4 flash have no sweep, and the abstract omits the 28% short-text gap stated in Section 5.3.
- High severityWhere in paper: Abstract; Section 5.1; Section 5.3; Table 3; Table 9; Figure 7
Figure 7 throughput counts the whole deployment, and Section 5.1 runs the two 64K sets with eight prefill instances per decode instance. DFly2 needs no drafter on prefill (Section 4); DFlash and DSpark do (Table 3). The 62% and 81% therefore mix acceptance with prefill placement. Table 3 already puts a window drafter at 1.71–1.73× decode concurrency versus 1.73× for KV sharing, so the gap versus DSpark is not the Section 3.1 cache-capacity ratio. Table 9 also breaks uniformity: GLM-5.3-Flash MemAgent end-to-end is 0.98× for DFly2, below the target alone and below DFlash at 1.01×; on DS-V4.1-Flash, DSpark end-to-end is 1.27× on MemAgent and 1.37× on BFCL-v3 versus DFly2 at 1.24× and 1.36×.
- High severityWhere in paper: Abstract; Section 5.1; Table 7; Table 9; Figure 7
The abstract's agentic margins are not agent-loop measurements. Section 5.1 says the main tables use the 2K chat setting, thinking disabled, at most 2048 generated tokens, and Figure 7 is greedy. The 10.0%–31.5% band is accepted length on long prompts (Table 7), not tool-call traces. On DS-V4.1-Flash the agentic group end-to-end speedup is 1.50× for DFly2 versus 1.44× for DSpark (Table 9).
- Medium severityWhere in paper: Section 1; Section 5.1; Table 7
Baselines are same-recipe reimplementations, not the drafters Section 1 says DeepSeek-V4, GLM-5, and Hy4 already ship. Same data and steps (Section 5.1) match training budget, but the paper argues dense-target context rules must be retargeted per model, so one recipe can handicap DFlash and DSpark. On Hy4 flash, DFlash falls to 1.08/1.06 on MemAgent (Table 7), so the long-context stronger baseline is the in-house window drafter rather than a length-robust full-cache drafter.
- Medium severityWhere in paper: Introduction; Section 3.3; Section 5.1; Section 5.2; Figure 3
The close-to-nine-tenths coverage claim is target-only and DS-V4.1-Flash-only (Section 3.3, 158,638 blocks; window 0.13–0.17 in Figure 3). GLM-5.3-Flash and Hy4 flash, where Table 7 margins are largest, have no coverage measurement. The shared index is row A-1, not each draft slot's query. Section 5.1 reports each accepted length as the mean of the last three runs and prints no variance. The general main table shows 7 of 12 DeepSpec sets, while the introduction says every benchmark.
Questions for the authors
- What absolute throughput (tokens/s) and concurrency correspond to the 62% and 81% points in Figure 7, and do those gaps hold on GLM-5.3-Flash and Hy4 flash if prefill GPUs are not charged to the baseline?
- How does DFly2 compare with the drafters DS-V4, GLM-5, and Hy4 already ship, under the same serving stack?
- Does top-k mass coverage stay near nine tenths on GLM-5.3-Flash and Hy4 flash, or only on DS-V4.1-Flash?
- What is τ and end-to-end speedup when thinking is on and generations run past 2048 tokens?
Related papers
arXiv:2610.28577 · cs.CL · Oct 20, 2026
Large Language Model (LLM) agents can handle increasingly complex tasks, navigating long trajectories of observations and actions. As these trajectories grow, key-value (KV) cache I/O and storage become the dominant cost. Trajectories can also exceed the LLM's maximum context length, requiring control over active cache growth. Prior work uses context engineering to reduce cache size by trimming or summarizing history. However, modifying the trajectory prefix invalidates subsequent cached states and triggers costly re-prefilling of retained context. Task accuracy can also suffer when too little context is retained to limit re-prefill costs. We propose cache engineering as a new scheme. It allows agents to directly control their active KV cache without modifying the trajectory or re-prefilling retained context. Specifically, agents can proactively use drop to exclude selected cache from future attention and repos to adjust retained keys' position encodings. We formalize these cache operations and identify history dependence as a serving challenge: identical token sequences can yield different cache states under different cache operation sequences, making prefix matching insufficient for correct cache reuse. Thus, we co-design the AKV serving engine. It provides a stateless interface compatible with existing serving APIs, while internally managing stateful cache reuse, eviction, and restoration. Experiments show that a tool-response rolling-drop cache policy improves average benchmark scores by 1.7 points and reduces average cost by 27.7%, compared with conventional threshold-triggered summarization. With AKV, it achieves up to 1.2x the output throughput and a 1.5x speedup in P95 request latency. Recursive self-improvement of cache policies further reduces cost by 7.1% over expert design. Our code is at https://github.com/thu-nics/AKV.
Tianyu Fu, Ruoxi Wang +7
arXiv:2611.26435 · cs.DC · Nov 19, 2026
LLM agents run long, multi-turn programs whose contexts grow at every step, and serving them is limited by KV cache capacity. To alleviate this limitation, systems use context compression techniques, which typically wait until the KV cache crosses a large threshold and then summarize large spans of history at once, either in the background while the agent progresses or on the critical path. These summarizations can be done using the same model running on the same engine, or using the same or a different model running on extra hardware. When running on the same engine, summarization competes with the requests being served for both compute and memory capacity. To maximize the cost-effectiveness of summarization, this paper presents a new serving system called {\em Aggron}. Aggron summarizes agentic requests at every turn and selectively summarizes only certain parts of the KV cache. As a result, Aggron retains accuracy and keeps summarization requests lightweight. Moreover, Aggron launches summarization requests from a separate {\em Summarization Queue} while the corresponding agentic request whose KV cache we want to compress is stalled in the main request queue due to head-of-line stalls. The Summarization queue utilizes compute and memory capacity left over by the head-of-line stalls in the main queue. Further, to maximize efficiency, the server issues summarizations only when it predicts that they can complete before the corresponding agentic request will finally execute. In our evaluation, we compare Aggron to state-of-the-art asynchronous summarization. At high load, Aggron reduces P99 program latency by $27$--$31\%$, and raises throughput by $1.34$--$1.40\times$.
Rishabh Ravi, Tony Hong +6
arXiv:2610.34763 · cs.SE · Oct 26, 2026
Coding agents resend a growing context on every model call, and context policies are usually judged by the prompt tokens they save. Executed work also depends on call count and prefix reuse: a caching runtime prefills only the tokens after the longest cached prefix. A shorter prompt can therefore cost more if it rewrites cached history. Our quality-gated protocol splits executed prefill into logical prompt minus reused prefix and measures KV residency, time, and energy. On 450 localization cases derived from SWE-rebench V2, preloading ten retrieved blocks (Eager) and adding anchored history compaction (Compact) both pass a five-point non-inferiority gate. In a separate 900-cell study, Eager cuts model calls by 35.7% and the GPU-energy proxy by 33.2% against on-demand search (Grep); Compact saves nothing further. Enabling prefix caching leaves Eager's prompt volume similar (+8.3%; its 95% CI spans zero) but cuts its uncached prefill by 67.7%. Deleting history can turn a token saving into extra work. With mini-SWE-agent on 100 SWE-bench Verified instances, keeping only the last five observations (Mask-5) cuts Eager's prompt volume by 33.3% but loses 135.9k reusable tokens per task. Uncached prefill rises by 608.5%, the energy proxy by 125.6%, and the policy misses the quality gate. Policies thus save physical work by shortening the trajectory and can multiply it by editing reusable history.
Zhongming Yu, Yitong Ma +5
arXiv:2611.33004 · cs.LG · Nov 24, 2026
Speculative decoding accelerates large language model (LLM) generation using a lightweight draft. Existing methods evaluate complete recipes under different training configurations, leaving component effects, interactions, and composition benefits unclear. Therefore, we present LEGOSpec, a composable framework for speculative draft design and training. LEGOSpec decomposes draft models into Context, Backbone, Proposal, and Objective components that share a unified training infrastructure. Using LEGOSpec, we systematically vary components and evaluate selected combinations under matched training conditions to isolate their effects and interactions. These experiments reveal three findings: (1) Different workloads favor different backbones, depending on context length and memory budget, with within-block dependency modeling particularly important for long contexts. (2) Proposal design must balance acceptance and latency. (3) The training objective should match token distributions locally and optimize acceptance length across the block. These findings guide workload-aware configurations and DFlux, a balanced general-purpose draft combining a convolution-equipped SWA--GQA hybrid backbone, Residual Corrector, and hierarchical supervision. Across Qwen and Gemma models, DFlux improves acceptance length over the strongest baseline by up to 13.7% on regular benchmarks and 34.7% on long-context workloads. To support efficient training, LEGOSpec integrates metadata-aware scheduling and asynchronous execution, increasing training throughput by up to 79% and accelerating offline supervision preparation by up to $3.11\times$ over SpecForge.
Hanzhen Wang, Jiaming Xu +1
arXiv:2611.25112 · cs.DC · Nov 18, 2026
LLM agents alternate between inference and tool execution, repeatedly reusing their growing context across calls. Under high concurrency, their combined key-value (KV) cache working set can reach hundreds of GiB, far exceeding GPU memory capacity. As idle KV cache blocks are evicted to slower storage tiers, returning agents incur expensive retrievals that stall inference. To address this problem, we present \emph{TripleKV}, a three-tier KV cache management system that hides the delays of these retrievals. %exploits tool execution to hide these delays. In agentic workloads, the KV blocks needed by the next inference request are known in advance; only the time of their reuse is uncertain. TripleKV uses a tool-aware latency predictor to estimate when each tool call will complete and prefetches the required KV blocks from SSD into host DRAM ahead of time. Unlike GPU prefetching, this avoids reserving scarce GPU memory and interfering with concurrent inference requests. To further improve DRAM utilization, TripleKV eliminates duplication of GPU-resident blocks in DRAM, and introduces a victim-cache mechanism that refills blocks from SSD upon their eviction from GPU memory. Across data, web, and coding agents, TripleKV reduces the fraction of requests requiring critical-path SSD reads from 45--76\% to under 10\%. It also reduces P95 time to first token (TTFT) by up to 49\% compared with vLLM extended with DRAM and SSD KV-cache tiers, and achieves 1.5-7$\times$ lower P95 TTFT than recent agent-aware systems.
Shashwat Jaiswal, Chloe Alverti +6
arXiv:2611.31105 · cs.AI · Nov 23, 2026
Updating an LLM adapter should not require replaying the full interaction history of every active session. Yet reusing key-value (KV) cache entries computed under an earlier version mixes model versions, while full-history re-prefill becomes increasingly costly as histories and session fleets grow. We introduce LiveLora, a model-runtime co-design for exact final-block KV cache migration. Frozen lower decoder blocks and fixed K/V adapter down-projections preserve each token's base projections and low-rank coordinates across adapter versions. The runtime reconstructs candidate K/V, reevaluates the latest token through the final block, and commits the adapter, cache, and next-token logits together. We prove continuation equivalence to full-history re-prefill in exact arithmetic under the stated model assumptions. On Qwen2.5-3B-Instruct, median paired publication speedups over full-history re-prefill average $68.98\times$ across five runs for 32 active sessions with 8K tokens each. Serving benchmarks show approximately 4.8% decoding overhead relative to native cached decoding. Compared with retained-boundary replay, compact retention gives a $3.42\times$ reduction in additional session storage at 8K, with similar measured publication-plus-decoding cost. LiveLora allows persistent LLM agents to adopt new adapter versions without replaying their full interaction histories.
Tianyi Huang, Samuel Xu +3