Manuscript Offprint
arXiv:2610.41177TraceSpec: Understanding and Improving Speculative Decoding for LLM Agents
Jihao Zhao
School of Information
Renmin University of China
Beijing, China
Biao Qin
School of Information
Renmin University of China
Beijing, China
Shuaishuai Zu
School of Information
Renmin University of China
Beijing, China
Guanghuan Fang
Ben Feng
Huawei Technologies Co., Ltd.
Hangzhou, China
Pengfei Li
Huawei Technologies Co., Ltd.
Beijing, China
Baochuan Yang
Huawei Technologies Co., Ltd.
Hangzhou, China
Abstract
LLM agents execute tasks through repeated model calls over evolving histories of reasoning, actions, and tool feedback. Aggregate speculative-decoding metrics merge these distinct decisions, providing limited guidance on where draft supervision is needed. We present TraceSpec, a framework connecting trajectory evaluation with adaptive draft training. It combines dynamic execution with fixed-prefix replay and introduces TraceSpec-Traj, a corpus of 10,000 training states and 2,500 test states spanning browsing and software engineering. Analysis of five speculative baselines reveals that aggregate acceptance can rise with context length while declining within matched late browsing actions. Workload and phase further distinguish these trends, motivating supervision guided by trajectory conditions. TraceSpec trains on intermediate assistant turns and allocates a fixed prediction budget using state-conditioned estimates of prefix-aware acceptance gaps. Across three target sizes and two temperatures, it improves replay throughput by 12.5% to 22.6% over its DSpark base. Qwen3-4B ablations show that adaptive allocation increases accepted length by 3.3% to 10.0% over fixed full-turn supervision, with additional comparisons substantiating the roles of state conditioning and consecutive-token agreement. The resulting evaluation resources, trajectory findings, and training strategy connect the analysis of agent execution to practical draft improvement. Our code is available at https://github.com/Robot2050/TraceSpec.
Keywords
Speculative decoding, language model agents, agent trajectories, draft supervision, inference efficiency
ACM Reference Format:
Jihao Zhao, Shuaishuai Zu, Pengfei Li, Biao Qin, Guanghuan Fang, Ben Feng, and Baochuan Yang. 2027. TraceSpec: Understanding and Improving Speculative Decoding for LLM Agents. In Proceedings of Preprint. ACM, New York, NY, USA, 13 pages.
Speculative decoding offers a direct way to accelerate these invocations. A small draft model proposes tokens for parallel verification by the target [20], with acceptance and correction preserving the target sampling distribution [4]. Accepted length measures how much output each verification round produces. Serving cost also depends on iteration-level scheduling [39], KV-cache management [19], prefill scheduling [1], and attention memory traffic [8]. Task-level scores describe overall agent capability; understanding speculative efficiency also requires tracing how verification work is distributed among model calls. Relating those calls to their surrounding history processing and tool use clarifies where improved agreement can affect execution time.
Growing histories make context length a natural candidate for explaining drafting difficulty. Long-context research identifies sensitivity to evidence position [22], variation across tasks in Long-Bench [2], and interactions between length and task complexity in RULER [13]. Agent histories additionally encode changing execution states. A long prefix may precede a short tool request, a reflection on new evidence, or a final answer. The same context range can contain decisions from different phases and from different points in a single task. These varying conditions motivate examining acceptance jointly with workload, execution phase, and task progress. The resulting research problem is to characterize agreement across these states and use the observations to allocate a finite supervision budget. A final assistant response covers one decision in a trajectory; earlier actions and revisions provide additional prediction targets. Their value for adaptation depends on where the current draft disagrees with the target, giving a basis for choosing both the decisions to supervise and their training exposure.
We develop TraceSpec around the decision boundaries in Figure 1, where agents request their next continuations. Dynamic
Corresponding authors.
Preprint, xxx
Zhao et al.

Figure 1: TraceSpec overview. (a) Trajectory-state construction, coverage, and source-task splits. (b) Dynamic execution and fixed-prefix replay with trajectory diagnosis. (c) Full-turn supervision with state-conditioned allocation and event-normalized sampling under a fixed prediction budget.
execution on BrowseComp-Plus and SWE-bench Verified captures the model calls encountered during interaction. Fixed-prefix replay on TraceSpec-Traj compares drafters on the same saved histories. Together, these protocols examine five speculative baselines across target sizes and sampling temperatures, and resolve their behavior by context, phase, and task progress. The online study shows rising aggregate acceptance alongside falling throughput between the shortest and longest contexts, yet matched late browsing actions exhibit lower acceptance. Replay additionally reveals opposing context trends across workloads and distinct phase profiles. Interpreting these patterns requires knowing what the model is being asked to do at each call, as well as how much history precedes it.
These findings shape two training choices: which assistant turns to supervise and how much exposure to assign them. TraceSpec uses intermediate decisions from target-generated trajectories and updates their priorities as draft-target disagreement changes. State-conditioned estimates account for trajectory differences, while prefix products capture how early disagreement limits consecutive acceptance. The allocation preserves broad coverage within a common prediction budget and retains the DSpark architecture and distillation objective. Controlled experiments examine supervision scope, adaptive allocation, and the construction of its scoring signal. Section 3 develops the framework from trajectory construction through exploratory analysis to draft supervision; Section 4 presents the comparative results and training ablations. Our contributions are:
- We introduce TraceSpec, an evaluation and supervision framework linking dynamic agent execution to fixed-prefix replay, and TraceSpec-Traj, with 10,000 training states and 2,500
test states from disjoint source tasks. Shared decision histories and trajectory annotations support comparisons across workloads, phases, and context strata, making intermediate decisions reusable units for both performance diagnosis and draft adaptation.
-
We characterize how acceptance profiles vary with workload, execution phase, and drafter. The divergence between aggregate browsing trends and matched late-action behavior shows why the conditions of comparison matter when interpreting long-context performance.
-
We formulate adaptive draft supervision under a finite prediction budget. Full-turn expansion exposes intermediate decisions, state-conditioned acceptance gaps guide their priority, and event-normalized sampling converts supervision shares into visits while accounting for unequal prediction counts.
-
We evaluate TraceSpec and five speculative baselines across 108 configurations, relating acceptance to temperature sensitivity and inference cost. TraceSpec leads all 24 replay phase comparisons and increases generation throughput over DSpark in 15 of 18 settings. Four Qwen3-4B ablations examine supervision scope, budget allocation, state conditioning, and consecutive-acceptance scoring.
2 Related Work
Speculative decoding for agent workloads. Drafter designs exploit fused target features in EAGLE-3 [21], parallel block generation in DFlash [5], and intra-block dependencies in DSpark [7]. LongSpark
Table 1: Trajectory corpus statistics. Source tasks are disjoint across splits.
| Corpus property | Training | Test |
|---|---|---|
| Trajectory states | 10,000 | 2,500 |
| Source tasks | 5,795 | 1,380 |
| Web research states | 5,000 | 1,250 |
| Software engineering states | 5,000 | 1,250 |
| Plan | 2,098 | 501 |
| Act | 3,151 | 920 |
| Reflect | 2,949 | 683 |
| Answer | 1,802 | 396 |
uses fixed-size target-state views [11], while DLite removes the historical draft cache [34]. Agent-oriented approaches further adapt token allocation to batched workflows in AgentSpec [32] and learn action proposals in LEAP [35]. These advances improve proposal construction and execution. Benchmark-level acceptance, however, compresses heterogeneous decisions into a single statistic, obscuring whether a context trend reflects changing agreement within a decision type or a different mixture of calls. Resolving this ambiguity calls for evaluation resources that retain intermediate decisions and permit comparisons under aligned histories.
Draft adaptation and supervision allocation. Knowledge distillation provides a basis for draft alignment [12]. DistillSpec examines training data and divergence choices [43], online speculative decoding adapts to deployment queries [23], and EDR weights rejection costs by decoding-state occupancy [40]. More broadly, curricula organize learning by difficulty [3], self-paced learning selects examples using the current model [18], and prioritized replay revisits transitions according to temporal-difference errors [29]. Importance sampling targets gradient variance [17], while DoReMi adjusts domain mixtures [33]. Applying these ideas to agent trajectories requires attention to both the unit of selection and its contribution to training. A short tool request and an extended reasoning response can supply different numbers of prediction targets even when sampled equally. Deciding which interactions merit further training is therefore coupled with measuring how a limited supervision budget is distributed among them.
3 TraceSpec Framework
The decision record in Figure 1 connects measurement and training. The corpus stores the history available before an assistant continuation. The analysis examines acceptance over the encountered workload and within more specific trajectory conditions. Its findings motivate the choice of supervision candidates and the feedback used to assign their training exposure.
3.1 Trajectory Corpus
TraceSpec represents an agent decision by its available history and next assistant continuation. Each state retains its workload, execution phase, actual tokenized prefix length, preceding tool interactions, and trajectory position. The four phases are planning, action, reflection, and answer generation. The representation in Figure 1(a)

Figure 2: Baseline replay acceptance by context length. Qwen3-8B on TraceSpec-Traj, grouped by domain, temperature, and actual input length. All methods receive the same prefixes.
supports controlled replay and supervision of intermediate decisions. We construct TraceSpec-Traj from DeepResearch-traj [14], Nebius SWE-agent trajectories [25], and the R2E-Gym development [27] and testing-agent collections [28]. R2E-Gym supplies repository environments for collecting software engineering trajectories [15]. Table 1 summarizes the 10,000 training states and 2,500 test states, equally divided between Web research and software engineering. All states from a source task remain in one partition.
Both splits cover all 40 combinations of two domains, five nominal context strata, and four phases. Histories retain preceding assistant decisions and tool observations, making the conditions of each prediction available for analysis. Replay holds this information constant across drafters. Draft adaptation in Section 3.3 applies the same representation to target-generated training trajectories, making each assistant continuation a supervision candidate. Joint coverage supports comparisons across contexts and roles; source composition and context quotas appear in Appendix B.
3.2 Exploratory Trajectory Analysis
We investigate how context growth relates to speculative acceptance during agent execution. The analysis follows three levels of evidence: aggregate online behavior, task-paired comparisons within late actions, and workload and phase profiles on fixed replay prefixes. This progression identifies which aspects of the trajectory are relevant to draft supervision.
3.2.1 Analysis Setup. Figure 1(b) connects dynamic execution and fixed-prefix replay to trajectory diagnosis. Dynamic execution follows generated actions and tool feedback on BrowseComp-Plus and SWE-bench Verified, while replay supplies identical saved test histories from TraceSpec-Traj to each drafter. The former characterizes the workload encountered during interaction; the latter compares methods at common decision boundaries. We measure accepted tokens per verification round, including the correction or bonus token, and model-call throughput, including prefill. Context intervals use tokens. The online context analysis fixes Qwen3-8B
Zhao et al.

Figure 3: Baseline acceptance across workloads. Columns show dynamic execution on BrowseComp-Plus and SWE-bench Verified, followed by fixed-prefix replay on TraceSpec-Traj. Groups denote Qwen3-4B, 8B, and 14B; rows denote T = 0 and T = 1. Error bars show pointwise 95% bootstrap intervals.
Table 2: Mean episode latency (s), T = 0. BC: BrowseComp-Plus; SWE: SWE-bench Verified. Gain is the latency reduction of DSpark over DFlash.
| Workload | Target | DFlash | EAGLE-3 | DSpark | Gain (%) |
|---|---|---|---|---|---|
| BC | 4B | 89.17 | 87.16 | 82.86 | 7.1 |
| BC | 8B | 73.18 | 77.27 | 68.14 | 6.9 |
| BC | 14B | 147.08 | 167.77 | 143.15 | 2.7 |
| SWE | 4B | 63.26 | 63.15 | 59.96 | 5.2 |
| SWE | 8B | 80.12 | 84.13 | 75.90 | 5.3 |
| SWE | 14B | 95.60 | 107.77 | 91.90 | 3.9 |
at T = 0 and compares DFlash, EAGLE-3, and DSpark; the greedy episode-cost comparison also includes 4B and 14B targets. Replay profiles cover the five baselines with the 8B target at T = 0 and T = 1. We progressively condition the analysis on task identity, execution phase, and task progress, then examine workload-specific profiles. Figure 3 provides their overall measurements; Section 4.1 specifies the full experimental and statistical protocol.
3.2.2 Context Growth and Execution Cost. Across the shortest and longest online context intervals in Figure 4, aggregate acceptance increases while generation throughput decreases. For DSpark with Qwen3-8B at T = 0, browsing acceptance rises from 3.633 tokens per round below 2k input tokens to 5.479 at 16k to 32k, while throughput falls from 82.73 to 22.54 tokens/s. Software engineering throughput falls from 73.83 to 28.19 tokens/s across the same intervals. This endpoint pattern of higher acceptance and lower throughput holds for all three methods in both workloads. The complete profiles

Figure 4: Online baseline acceptance and throughput by context length. Qwen3-8B at T = 0: upper panels show accepted tokens per round; lower panels show output tokens/s, including prefill.
reveal a further distinction: browsing acceptance increases across the five intervals, whereas software engineering acceptance peaks at 8k to 16k and declines in the final interval for every method. Both workloads therefore show lower throughput at long contexts, while the shape of the acceptance curve depends on the workload.
Table 3: Late-action acceptance: Qwen3-8B, T = 0, step ≥ 20. Tasks are paired across 8k to 16k and 16k to 32k contexts; .
| Workload | Drafter | 95% CI of | ||
|---|---|---|---|---|
| BC | DFlash | 5.661 | 4.326 | [-1.650, -0.941] |
| BC | EAGLE-3 | 6.007 | 4.897 | [-1.489, -0.612] |
| BC | DSpark | 6.194 | 5.322 | [-1.205, -0.473] |
| SWE | DFlash | 5.333 | 4.762 | [-0.852, -0.257] |
| SWE | EAGLE-3 | 6.149 | 6.304 | [-0.347, 0.716] |
| SWE | DSpark | 6.057 | 6.106 | [-0.238, 0.379] |
These measurements distinguish draft agreement from over-all model-call costs. Accepted length describes agreement on the next continuation; model-call throughput includes the work of processing the available history. At the task level, verification is one component of the complete execution cost:
For a fixed continuation length, higher acceptance reduces the number of verification rounds. The contribution of this reduction to task latency depends on the other costs in Equation 1. Across the six greedy online configurations in Table 2, DSpark improves accepted length over DFlash by 10.1% to 13.8%, while mean episode latency decreases by 2.7% to 7.1%.
The aggregate acceptance curve also combines different decisions. Each context interval contains the tasks and phases reached during execution, weighted by their verification counts. Its trend reflects both agreement within these states and their relative contributions to the workload. A context interval containing a larger share of high-acceptance calls can have a higher aggregate even when agreement falls within a particular phase. This makes the composition of the trajectory an explicit part of the analysis. We therefore examine late actions within matched tasks to resolve how a specific decision type behaves beneath the rising aggregate trend.
3.2.3 Late Actions within Matched Tasks. We select action calls at step 20 or later and pair tasks contributing to both the 8k to 16k and 16k to 32k intervals. This comparison holds task identity, execution phase, and the late-stage threshold fixed while examining acceptance at two context ranges. Counters are aggregated within each task and interval; paired task resampling estimates the difference between the resulting acceptance ratios. For Qwen3-8B at T = 0, DSpark browsing acceptance decreases from 6.194 to 5.322 tokens per round, a difference of -0.872 with a pointwise 95% interval of [-1.205, -0.473]. Table 3 gives corresponding differences of -1.336 and -1.110 for DFlash and EAGLE-3. The direction is opposite to the aggregate online comparison in Section 3.2.2. Resolving the trajectory by phase and progress therefore exposes lower agreement in late browsing decisions even as the overall acceptance curve rises. Appendix D details the paired estimator.
The corresponding software engineering differences are -0.571, +0.155, and +0.049 for DFlash, EAGLE-3, and DSpark, respectively.

Figure 5: Baseline acceptance by domain and phase. Qwen3-8B results on TraceSpec-Traj at T = 0 and T = 1, measured in accepted tokens per round. All panels share a common color scale.
DFlash has a negative difference, while the latter two point estimates change little. Under the same phase and progress condition, the workloads exhibit different context profiles. These within-trajectory differences motivate supervision of intermediate assistant decisions, with priorities estimated from agreement in their respective states.
3.2.4 Workload and Phase Profiles. The replay profiles in Figure 2 compare methods on identical saved decision inputs. For DSpark with the 8B target at T = 0, Web research acceptance decreases from 5.242 below 2k tokens to 3.442 at 16k to 32k. Software engineering acceptance increases from 3.073 to 4.321 across the same intervals. These opposing endpoint trends place workload alongside length as an essential condition for interpreting acceptance. The relationship also varies across drafters. At T = 0, all five baselines have higher acceptance in the longest than in the shortest software engineering interval. In Web research, DFlash and EAGLE-3 share the declining endpoint trend of DSpark, while LongSpark and DLite have higher long-context endpoints. A state-level analysis therefore distinguishes both the workload being served and the draft used to serve it.
Figure 5 compares acceptance across phases. For DSpark at T = 0, Web research actions reach 4.966 tokens per round, compared with 3.488 for planning. Software engineering reflection reaches 4.447, compared with 3.232 for answers. The highest-acceptance phase changes from action to reflection across these domains. Context and phase profiles together describe where the draft aligns well with the target and where additional supervision can be directed.
The practical implication is to estimate training priority at the granularity of an assistant decision, using conditional agreement to distinguish supervision needs among states with comparable history lengths. Intermediate actions and revisions carry information that a trajectory average can conceal, while workload and phase provide the conditions needed to interpret their agreement. Priorities can then be refreshed from the current draft as training proceeds, linking the observed heterogeneity to a concrete allocation problem.
Zhao et al.
3.3 Adaptive Draft Supervision
In Figure 1(c), training couples assistant-turn selection with the share of prediction events assigned to each turn. The allocation policy operates on segments from target-generated trajectories and uses training feedback to revise those shares. The frozen target supplies outputs and features, while the draft retains the DSpark architecture and distillation objective [7].
3.3.1 Assistant-Turn Supervision. Each assistant generation in a target-generated training trajectory becomes a segment , comprising its available history and text or tool-call continuation. Training supervises eligible predictions in . Each segment carries state : actual prefix length, execution phase, workload, and preceding tool state, including observations and error or retry events. Tasks are split before expansion. Full-turn expansion supplies intermediate decisions for both fixed and adaptive allocation.
3.3.2 State-Conditioned Acceptance Gap. An anchor starts a supervised draft block. For sampled block b with consecutive valid predictions, target and draft distributions and on a common vocabulary have overlap
Here TV denotes total variation distance. This overlap connects distribution agreement to speculative acceptance [4, 20]. Over sampled blocks , we define
The prefix products emphasize early disagreement within a block; measures the resulting normalized gap. The signal uses teacher-forced response prefixes and overlap statistics available in DSpark distillation. Segment feedback is smoothed by trajectory state:
Here is the segment moving average, its decayed visit support, the mean of the state group, and the shrinkage strength. Groups combine the attributes in , pooling at coarser levels for sparse states. This estimate combines segment feedback with shared state structure as the draft changes.
3.3.3 Allocation under a Prediction Budget. An effective prediction event is a valid anchor and prediction-position pair used in an update. Base shares , summing to one, distribute supervision across actual prefix-length strata and workloads, with uniform shares among segments in each group. We normalize and clip estimated gaps:
Here stabilizes the ratio and bounds relative difficulty. The assigned supervision share is
With , the allocation retains ; equal estimated gaps recover the base shares. Adaptive exposure follows relative disagreement.
Let estimate the effective events supplied by one segment visit. Event-normalized sampling uses
With accurate event-count estimates, this gives expected supervision shares . Actual training masks count the effective prediction events consumed toward budget . The fixed control uses the same conversion with . The first epoch collects statistics under the base allocation; subsequent epochs refresh the sampling table from training feedback. Development tasks determine scheduling hyperparameters. Scheduling scores are detached, and sampled segments use the original distillation loss. Appendix E gives the pooling hierarchy, allocation properties, and expected-share derivation.
4 Experiments
4.1 Experimental Setup
Datasets and evaluation protocols. Dynamic evaluation uses 100 tasks from each of BrowseComp-Plus [6] and SWE-bench Verified [16]. Browsing agents retrieve and inspect benchmark documents. Repository agents read real repository contents, with simulated feedback for edit and test operations. Fixed-prefix replay evaluates the 2,500 TraceSpec-Traj test states described in Section 3.1; every method receives the same saved histories and generates one assistant continuation. The training partition supplies separate source tasks for draft adaptation.
Baselines and inference settings. We compare TraceSpec with DFlash [5], EAGLE-3 [21], DSpark [7], LongSpark [11], and DLite [34] using Qwen3-4B, 8B, and 14B targets [26] at , with thinking mode disabled. The three workloads, six methods, three target sizes, and two temperatures give 108 configurations. Baselines use their released target-specific checkpoints. DFlash, DSpark, and TraceSpec use seven-token draft blocks; EAGLE-3 uses the corresponding released configuration. Dynamic episodes allow 50 action steps and 32,768 context tokens; replay allows 36,864 context tokens. Both modes permit up to 4,096 new tokens per call. Acceptance comparisons cover all six methods. Generation-throughput comparisons use the native PyTorch group of DFlash, EAGLE-3, DSpark, DLite, and TraceSpec. LongSpark uses SGLang [41] and contributes to the acceptance comparisons. Episode latency is compared within the original DFlash, EAGLE-3, and DSpark runs. Checkpoint families and additional settings appear in Appendix A.
Training protocol. TraceSpec adapts the corresponding DSpark draft using target-generated trajectories from the training partition. The Qwen3-4B ablations share these trajectories and match effective-event budgets, draft initialization, target model, distillation loss, and optimizer settings. Section 4.5 specifies the changes to supervision scope, allocation, state estimation, and scoring.
Table 4: Phase-level dynamic acceptance at (accepted tokens per round, ). Bold marks the highest value per phase and workload. TraceSpec uses adaptive full-turn supervision.
| Target | Phase | BrowseComp-Plus | SWE-bench Verified | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EAGLE-3 | DFlash | LongSpark | DLite | DSpark | TraceSpec | EAGLE-3 | DFlash | LongSpark | DLite | DSpark | TraceSpec | ||
| Qwen3-4B | Plan | 3.674 | 3.581 | 3.112 | 2.804 | 4.031 | 4.161 | 4.058 | 3.972 | 3.109 | 2.661 | 4.407 | 4.456 |
| Act | 4.605 | 4.072 | 3.260 | 3.281 | 4.617 | 4.923 | 5.113 | 4.491 | 3.710 | 2.638 | 5.116 | 5.467 | |
| Reflect | 4.658 | 4.112 | 3.064 | 3.060 | 4.779 | 5.123 | 5.118 | 4.624 | 2.956 | 2.665 | 5.258 | 5.402 | |
| Answer | 3.910 | 3.463 | 4.186 | 3.261 | 3.980 | 4.279 | 3.687 | 3.356 | 3.181 | 2.592 | 3.901 | 4.295 | |
| Qwen3-8B | Plan | 3.946 | 3.922 | 3.373 | 3.035 | 4.456 | 4.570 | 3.271 | 3.190 | 2.840 | 2.614 | 3.562 | 3.656 |
| Act | 3.871 | 3.788 | 3.037 | 2.812 | 4.210 | 4.346 | 4.524 | 4.156 | 3.345 | 2.627 | 4.686 | 4.935 | |
| Reflect | 4.315 | 4.156 | 3.103 | 2.926 | 4.688 | 4.881 | 4.424 | 4.169 | 2.783 | 2.702 | 4.714 | 4.976 | |
| Answer | 3.370 | 3.388 | 3.458 | 2.821 | 3.889 | 3.989 | 3.426 | 3.388 | 3.086 | 2.713 | 3.927 | 4.217 | |
| Qwen3-14B | Plan | 3.741 | 3.829 | 3.663 | 3.127 | 4.289 | 4.486 | 2.887 | 2.746 | 2.780 | 2.473 | 3.123 | 3.185 |
| Act | 4.031 | 4.357 | 3.277 | 2.885 | 4.831 | 5.018 | 4.064 | 4.146 | 3.301 | 2.542 | 4.616 | 4.780 | |
| Reflect | 4.030 | 4.922 | 3.711 | 3.108 | 5.253 | 5.890 | 3.840 | 3.929 | 3.044 | 2.747 | 4.443 | 4.499 | |
| Answer | 3.619 | 4.077 | 3.973 | 2.884 | 4.535 | 4.512 | 3.232 | 3.504 | 3.375 | 2.798 | 3.975 | 4.188 | |
Table 5: Replay acceptance on TraceSpec-Traj (). All methods use identical saved prefixes. Column groups separate temperatures; rows and highlighting follow Table 4.
| Target | Phase | TraceSpec-Traj, | TraceSpec-Traj, | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EAGLE-3 | DFlash | LongSpark | DLite | DSpark | TraceSpec | EAGLE-3 | DFlash | LongSpark | DLite | DSpark | TraceSpec | ||
| Qwen3-4B | Plan | 3.899 | 3.585 | 3.611 | 2.618 | 4.161 | 4.856 | 2.972 | 2.756 | 2.863 | 2.470 | 3.639 | 4.218 |
| Act | 3.704 | 3.419 | 2.788 | 2.549 | 3.953 | 4.909 | 3.316 | 2.892 | 2.824 | 2.471 | 3.789 | 4.695 | |
| Reflect | 3.777 | 3.439 | 3.252 | 2.651 | 4.092 | 4.859 | 3.303 | 2.810 | 3.004 | 2.499 | 3.752 | 4.669 | |
| Answer | 3.089 | 2.803 | 3.013 | 2.578 | 3.294 | 4.126 | 2.788 | 2.507 | 2.881 | 2.488 | 3.248 | 3.993 | |
| Qwen3-8B | Plan | 3.156 | 3.345 | 3.041 | 2.610 | 3.808 | 4.397 | 2.755 | 2.925 | 2.912 | 2.553 | 3.620 | 4.060 |
| Act | 3.873 | 3.999 | 3.203 | 2.563 | 4.436 | 5.141 | 3.155 | 3.129 | 2.769 | 2.422 | 3.956 | 4.630 | |
| Reflect | 3.504 | 3.578 | 3.221 | 2.751 | 4.095 | 4.662 | 2.889 | 2.899 | 2.915 | 2.617 | 3.602 | 4.153 | |
| Answer | 2.764 | 2.963 | 2.968 | 2.611 | 3.425 | 4.081 | 2.528 | 2.615 | 2.878 | 2.592 | 3.319 | 4.086 | |
| Qwen3-14B | Plan | 3.160 | 3.517 | 3.050 | 2.548 | 3.933 | 4.584 | 2.793 | 3.080 | 2.901 | 2.485 | 3.654 | 4.273 |
| Act | 3.382 | 3.754 | 3.027 | 2.539 | 4.149 | 5.053 | 2.914 | 3.385 | 2.845 | 2.418 | 3.936 | 4.728 | |
| Reflect | 3.354 | 3.681 | 3.093 | 2.624 | 4.128 | 4.737 | 2.815 | 3.243 | 2.873 | 2.492 | 3.789 | 4.247 | |
| Answer | 2.921 | 3.313 | 3.088 | 2.586 | 3.714 | 4.282 | 2.600 | 3.028 | 2.941 | 2.537 | 3.536 | 4.149 | |
Evaluation metrics. For call , let count emitted accepted tokens, including the correction or bonus token, verification rounds, proposed draft tokens, output tokens, and model-call time. We report accepted length , verification yield , and generation throughput :
Model-call time includes prefill and decoding. Episode latency spans the full interactive loop, including tool execution. Ratios use summed counters so that each verification round or generated token contributes to the corresponding aggregate. Pointwise 95% baseline acceptance intervals use 5,000 bootstrap replicates over original tasks for dynamic execution and source-task clusters for replay, preserving method pairing and recomputing counter ratios.
4.2 Main Results
Tables 4 and 5 report phase-specific acceptance: dynamic execution at and replay at both temperatures. Across all settings, TraceSpec leads 68 of 72 comparisons, including all 24 replay and 44 of 48 dynamic settings. On TraceSpec-Traj, gains over DSpark range from 12.1% to 25.3% across planning, actions, reflection, and answer generation. Replay compares methods on identical histories, linking the observed gains to stronger draft agreement across the same agent decision states. These improvements span the distinct prediction roles covered by full-turn supervision.
Across the five baselines, DSpark leads overall accepted length in Figure 3 and verification yield in all 18 settings. All 72 paired accepted-length comparisons against the other four baselines have
Zhao et al.
Table 6: Qwen3-4B component ablations on accepted length . and use fixed allocation; and each modify TraceSpec.
| Training variant | BrowseComp-Plus | SWE-bench Verified | TraceSpec-Traj | |||
|---|---|---|---|---|---|---|
| TraceSpec | 4.803 | 4.145 | 5.142 | 4.859 | 4.753 | 4.428 |
| w/o intermediate-turn supervision () | 4.307 | 3.745 | 4.619 | 4.169 | 4.275 | 3.782 |
| w/o adaptive budget allocation () | 4.473 | 3.904 | 4.849 | 4.417 | 4.602 | 4.169 |
| w/o state-conditioned estimation () | 4.420 | 4.000 | 4.769 | 4.449 | 4.422 | 4.056 |
| w/o prefix-aware scoring () | 4.510 | 4.055 | 4.855 | 4.439 | 4.598 | 4.220 |
Table 7: Qwen3-4B inference results. Throughput includes prefill and uses native PyTorch methods. Bold marks column maxima within each metric.
| Drafter | BrowseComp-Plus | SWE-bench Verified | TraceSpec-Traj | |||
|---|---|---|---|---|---|---|
| Verification yield (%) | ||||||
| DFlash | 50.6 | 40.3 | 54.9 | 45.9 | 42.7 | 34.8 |
| EAGLE-3 | 56.9 | 48.1 | 61.3 | 53.0 | 47.8 | 40.3 |
| LongSpark | 40.5 | 38.4 | 43.0 | 37.0 | 40.4 | 36.3 |
| DLite | 40.3 | 32.2 | 33.5 | 31.8 | 32.7 | 31.1 |
| DSpark | 57.7 | 51.5 | 62.3 | 58.1 | 50.0 | 46.0 |
| TraceSpec | 59.9 | 51.3 | 64.2 | 60.6 | 61.2 | 57.1 |
| Generation throughput (tokens/s) | ||||||
| DFlash | 41.75 | 37.37 | 62.86 | 57.99 | 38.93 | 32.06 |
| EAGLE-3 | 42.98 | 44.16 | 61.49 | 57.73 | 39.15 | 33.49 |
| DLite | 31.06 | 38.61 | 39.99 | 39.10 | 31.82 | 30.28 |
| DSpark | 46.20 | 54.19 | 67.94 | 66.42 | 44.25 | 40.28 |
| TraceSpec | 48.73 | 56.19 | 69.66 | 69.70 | 53.44 | 49.37 |
positive lower bounds for their pointwise 95% intervals, supporting DSpark as the base drafter.
Baseline rankings vary with target and workload. EAGLE-3 exceeds DFlash in the 4B and 8B dynamic settings, whereas DFlash leads at 14B. On TraceSpec-Traj, EAGLE-3 is the strongest alternative to DSpark at 4B and DFlash at 8B and 14B.
4.3 Inference Efficiency
Table 7 summarizes Qwen3-4B results. TraceSpec achieves the highest verification yield in five settings and throughput in all six. Relative to DSpark, replay yield increases from 50.0% to 61.2% at and from 46.0% to 57.1% at . Corresponding throughput rises from 44.25 to 53.44 and from 40.28 to 49.37 tokens/s, respectively. These improvements connect greater verification yield to faster generation on shared inputs. Across target sizes, TraceSpec leads throughput in 15 of 18 native PyTorch settings, with replay gains of 12.5% to 22.6% over DSpark. Appendix C provides the 8B and 14B results and supplementary dynamic comparisons.
DSpark has the lowest mean episode latency in 10 of 12 original three-method settings; DFlash leads at 8B and . Table 2 reports the greedy results. As Section 3.2.2 shows, episode latency combines
verification, history processing, and tool costs, distinguishing task completion time from generation throughput.
4.4 Effect of Sampling Temperature
Figure 3 shows lower accepted length at in all 45 matched baseline comparisons. On TraceSpec-Traj, DSpark decreases by 6.5% to 8.7%, compared with 11.0% to 18.2% for DFlash and 13.5% to 15.4% for EAGLE-3. TraceSpec leads all 12 replay phase comparisons at and exceeds each ablated Qwen3-4B variant at both temperatures in Table 6.
For Qwen3-4B on BrowseComp-Plus, DSpark throughput increases from 46.20 to 54.19 tokens/s at even as acceptance falls. On fixed-prefix replay, throughput decreases from 44.25 to 40.28 tokens/s. Online timing reflects the workload generated at each temperature, while replay holds the input history constant.
4.5 Training Ablations
Table 6 compares TraceSpec with four variants on shared target-generated trajectories under the same effective-event budget. supervises the final assistant response with fixed allocation; adds intermediate turns while retaining fixed allocation. Their comparison isolates supervision scope, and TraceSpec versus isolates adaptive allocation. The remaining variants each modify the full method: replaces the state-group prior in Equation 4 with a global prior while preserving segment statistics; replaces the prefix products in Equation 3 with a mean of prediction gaps.
Full-turn supervision improves accepted length by 3.9% to 10.2% over final-turn training across the six workload and temperature settings. Adaptive allocation adds 3.3% to 10.0% over fixed full-turn supervision, with the largest increment on SWE-bench Verified at , from 4.417 to 4.859. These comparisons show that intermediate responses supply useful training signals and that their allocation contributes beyond broader supervision coverage.
TraceSpec exceeds by 3.6% to 9.2% and by 2.2% to 9.5% across all six settings. On TraceSpec-Traj at , accepted length rises from 4.056 with global-prior estimation and 4.220 with position-wise scoring to 4.428 with the complete method. The former comparison supports estimating difficulty within trajectory conditions; the latter supports accounting for the dependence of later acceptance on earlier predictions. Together, they connect the allocation gains to the state heterogeneity and sequential acceptance structure motivating the method. Appendix E specifies the controls.
5 Conclusion
TraceSpec connects trajectory-resolved evaluation with adaptive draft supervision for LLM agents. TraceSpec-Traj preserves intermediate decision states for controlled replay, complementing dynamic execution. Trajectory analysis shows that drafting difficulty varies with workload, phase, and task progress, including a reversal between aggregate browsing trends and matched late-action behavior. These findings guide full-turn supervision and adaptive allocation through state-conditioned, prefix-aware acceptance gaps. Controlled ablations identify gains from supervision coverage, allocation, and scoring; TraceSpec improves replay generation throughput by 12.5% to 22.6% over DSpark. The study establishes an empirical basis for allocating limited draft supervision across heterogeneous agent decision states.
References
[1] Amey Agrawal, Nitin Kedia, Ashish Panwar, Jayashree Mohan, Nipun Kwatra, Bhargav Gulavani, Alexey Tumanov, and Ramachandran Ramjee. 2024. Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve. In 18th USENIX Symposium on Operating Systems Design and Implementation. USENIX Association, 117–134. https://www.usenix.org/conference/osdi24/presentation/agrawal
[2] Yushi Bai, Xin Lv, Jiajie Zhang, Hongchang Lei Hou, Jiankai Tang, Zhidian Huang, Zhengxiao Du, Xiao Liu, Aohan Zeng, Liu Yu, Yuxiao Dong, Jie Tang, and Juanzi Li. 2024. LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, 3119–3137. doi:10.18653/v1/2024.acl-long.172
[3] Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. 2009. Curriculum Learning. In Proceedings of the 26th Annual International Conference on Machine Learning. Association for Computing Machinery, 41–48. doi:10.1145/1553374.1553380
[4] Charlie Chen, Sebastian Borggeaud, Geoffrey Irving, Jean-Baptiste Lespiau, Laurent Sifre, and John Jumper. 2023. Accelerating Large Language Model Decoding with Speculative Sampling. arXiv:2302.01318 doi:10.48550/arXiv.2302.01318
[5] Jian Chen, Yesheng Liang, and Zhijian Liu. 2026. DFlash: Block Diffusion for Flash Speculative Decoding. In Proceedings of the 43rd International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 306). PMLR, 15343–15355. https://proceedings.mlr.press/v306/chen26bv.html
[6] Zijian Chen, Xueguang Ma, Shengyao Zhuang, Ping Nie, Kai Zou, Andrew Liu, Joshua Green, Kshama Patel, Ruoxi Meng, Mingyi Su, Sahel Sharifqohad-dam, Yanxi Li, Haoran Hong, Xinyu Shi, Xuye Liu, Nandan Thakur, Crystina Zhang, Luyao Gao, Wenhu Chen, and Jimmy Lin. 2025. BrowseComp-Plus: A More Fair and Transparent Evaluation Benchmark of Deep-Research Agent. arXiv:2508.06600 doi:10.48550/arXiv.2508.06600
[7] Xin Cheng, Xingkai Yu, Chenzhe Shao, Jiaoshi Li, Yunfan Xiong, Yi Qian, Jiaqi Zhu, Shirong Ma, Xiaokang Zhang, Jiasheng Ye, Qinyu Chen, Chengqi Deng, Jiping Yu, Damai Dai, Zhengyan Zhang, Yixuan Wei, Yixuan Tan, Wenkai Yang, Runxin Xu, Yu Wu, Zhean Xu, Xuanyu Wang, Muyang Chen, Rui Tian, Xiao Bi, Zhewen Hao, Shaoyuan Chen, Huanqi Cao, Wentao Zhang, Anyu Xu, Huishuai Zhang, Dongyan Zhao, and Wenfeng Liang. 2026. DSpark: Confidence-Scheduled Speculative Decoding with Semi-Autoregressive Generation. arXiv:2607.05147 doi:10.48550/arXiv.2607.05147
[8] Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. 2022. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness. In Advances in Neural Information Processing Systems, Vol. 35. Curran Associates, Inc., 16344–16359. doi:10.52202/068431-1189
[9] Xiang Deng, Yu Gu, Boyuan Zheng, Shijie Chen, Samuel Stevens, Boshi Wang, Huan Sun, and Yu Su. 2023. Mind2Web: Towards a Generalist Agent for the Web. In Advances in Neural Information Processing Systems, Vol. 36. Curran Associates, Inc., 28091–28114. doi:10.52202/075280-1220
[10] Hongliang He, Wenlin Yao, Kaixin Ma, Wenhao Yu, Yong Dai, Hongming Zhang, Zhenzhong Lan, and Dong Yu. 2024. WebVoyager: Building an End-to-End Web Agent with Large Multimodal Models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Association for Computational Linguistics, 6864–6890. doi:10.18653/v1/2024.acl-long.371
[11] Hao-Yuan He, Peng-Fei Liu, Si Shen, and Ming Li. 2026. LongSpark: Efficient Speculative Decoding with a Fixed-Cost Parallel Drafter. arXiv:2609.37029 doi:10.48550/arXiv.2609.37029
[12] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. 2015. Distilling the Knowledge in a Neural Network. arXiv:1503.02531 https://arxiv.org/abs/1503.02531
[13] Cheng-Ping Hsieh, Simeng Sun, Samuel Kriman, Shantanu Acharya, Dima Rekesh, Fei Jia, Yang Zhang, and Boris Ginsburg. 2024. RULER: What's the Real Context Size of Your Long-Context Language Models?. In First Conference on Language Modeling. https://arxiv.org/abs/2404.06654
[14] IPF. 2026. DeepResearch-traj. Hugging Face dataset. Retrieved October 25, 2026 from https://huggingface.co/datasets/IPF/DeepResearch-traj
[15] Naman Jain, Jaskirat Singh, Manish Shetty, Liang Zheng, Koushik Sen, and Ion Stoica. 2025. R2E-Gym: Procedural Environments and Hybrid Verifiers for Scaling Open-Weights SWE Agents. arXiv:2504.07164 doi:10.48550/arXiv.2504.07164
[16] Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik Narasimhan. 2024. SWE-bench: Can Language Models Resolve Real-World GitHub Issues?. In The Twelfth International Conference on Learning Representations. 54107–54157. https://proceedings.iclr.cc/paper_files/paper/2024/hash/edac78c3e300629acef6cbe9ca88fb84-Abstract-Conference.html
[17] Angelos Katharopoulos and François Fleuret. 2018. Not All Samples Are Created Equal: Deep Learning with Importance Sampling. In Proceedings of the 35th International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 80). PMLR, 2525–2534. https://proceedings.mlr.press/v80/katharopoulos18a.html
[18] M. Pawan Kumar, Benjamin Packer, and Daphne Koller. 2010. Self-Paced Learning for Latent Variable Models. In Advances in Neural Information Processing Systems, Vol. 23. Curran Associates, Inc., 1189–1197. https://papers.nips.cc/paper_files/paper/2010/hash/e57c6b956a6521b28495f2886ca0977a-Abstract.html
[19] Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. 2023. Efficient Memory Management for Large Language Model Serving with PagedAttention. In Proceedings of the 29th Symposium on Operating Systems Principles. Association for Computing Machinery, 611–626. doi:10.1145/3600006.3613165
[20] Yaniv Leviathan, Matan Kalman, and Yossi Matias. 2023. Fast Inference from Transformers via Speculative Decoding. In Proceedings of the 40th International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 202). PMLR, 19274–19286. https://proceedings.mlr.press/v202/leviathan23a.html
[21] Yuhui Li, Fangyun Wei, Chao Zhang, and Hongyang Zhang. 2025. EAGLE-3: Scaling up Inference Acceleration of Large Language Models via Training-Time Test. In Advances in Neural Information Processing Systems, Vol. 38. Curran Associates, Inc., 136737–136756. doi:10.52202/085713-4562
[22] Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. 2024. Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics 12 (2024), 157–173. doi:10.1162/tacl_a_00638
[23] Xiaoxuan Liu, Lanxiang Hu, Peter Bailis, Alvin Cheung, Zhijie Deng, Ion Stoica, and Hao Zhang. 2024. Online Speculative Decoding. In Proceedings of the 41st International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 235). PMLR, 31131–31146. https://proceedings.mlr.press/v235/liu24y.html
[24] Xiao Liu, Hao Yu, Hanchen Zhang, Yifan Xu, Xuanyu Lei, Hanyu Lai, Yu Gu, Hangliang Ding, Kaiwen Men, Kejuan Yang, Shudan Zhang, Xiang Deng, Aohan Zeng, Zhengxiao Du, Chenhui Zhang, Sheng Shen, Tianjian Zhang, Yu Su, Huan Sun, Minlie Huang, Yuxiao Dong, and Jie Tang. 2024. AgentBench: Evaluating LLMs as Agents. In The Twelfth International Conference on Learning Representations. 52989–53046. https://proceedings.iclr.cc/paper_files/paper/2024/hash/e9df36b21fff4ee211a8b71ee8b7e9f57-Abstract-Conference.html
[25] Nebius. 2024. SWE-agent-trajectories. Hugging Face dataset. Retrieved October 25, 2026 from https://huggingface.co/datasets/nebius/SWE-agent-trajectories
[26] Qwen Team. 2025. Qwen3-8B Model Card. Hugging Face model release. Retrieved October 25, 2026 from https://huggingface.co/Qwen/Qwen3-8B
[27] R2E-Gym. 2025. R2EGym-SFT-Trajectories. Hugging Face dataset. Retrieved October 25, 2026 from https://huggingface.co/datasets/R2E-Gym-SFT-Trajectories
[28] R2E-Gym. 2025. R2EGym-TestingAgent-SFT-Trajectories. Hugging Face dataset. Retrieved October 25, 2026 from https://huggingface.co/datasets/R2E-Gym/R2EGym-TestingAgent-SFT-Trajectories
[29] Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. 2016. Prioritized Experience Replay. In The Fourth International Conference on Learning Representations. https://arxiv.org/abs/1511.05952
[30] Timo Schick, Jane Dwivedi-Yu, Roberto Dessi, Roberta Raileanu, Maria Lomeli, Eric Hambro, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. 2023. Toolformer: Language Models Can Teach Themselves to Use Tools. In Advances in Neural Information Processing Systems, Vol. 36. Curran Associates, Inc., 68539–68551. doi:10.52202/075280-2997
[31] Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. 2023. Reflexion: Language Agents with Verbal Reinforcement Learning. In Advances in Neural Information Processing Systems, Vol. 36. Curran Associates, Inc., 8634–8652. doi:10.52202/075280-0377
[32] Xin Wang, Ziming Miao, Yi Zhu, Hui Shen, Zhongwei Wan, Fan Yang, and Mi Zhang. 2026. AgentSpec: Speculative Decoding for Batch Inference of LLM Agents. Accepted at EMNLP 2026. arXiv:2608.24004 doi:10.48550/arXiv.2608.24004
Zhao et al.
[33] Sang Michael Xie, Hieu Pham, Xuanyi Dong, Nan Du, Hanxiao Liu, Yifeng Lu, Percy Liang, Quoc V. Le, Tengyu Ma, and Adams Wei Yu. 2023. DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretraining. In Advances in Neural Information Processing Systems, Vol. 36. Curran Associates, Inc., 69798–69818. doi:10.52202/075280-3059
[34] Jiaming Xu, Hanzhen Wang, Tianlang Zhao, Jiewen Xiao, Chengze Yuan, Jiayi Pan, Yongkang Zhou, Jiancai Ye, Yu Wang, and Guohao Dai. 2026. DLite: History-Free Speculative Decoding for Agentic AI. arXiv:2610.23787 doi:10.48550/arXiv.2610.23787
[35] Zhen Xu, Qizheng Zhang, Gerry Wan, Shang Zhu, and Ce Zhang. 2026. LEAP: Learning Efficient Action Proposals for LLM Agents. arXiv:2610.02670 doi:10.48550/arXiv.2610.02670
[36] John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, and Ofir Press. 2024. SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering. In Advances in Neural Information Processing Systems, Vol. 37. Curran Associates, Inc., 50528–50652. doi:10.52202/079017-1601
[37] Shunyu Yao, Howard Chen, John Yang, and Karthik Narasimhan. 2022. WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agents. In Advances in Neural Information Processing Systems, Vol. 35. Curran Associates, Inc., 20744–20757. doi:10.52202/068431-1508
[38] Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. 2023. ReAct: Synergizing Reasoning and Acting in Language Models. In The Eleventh International Conference on Learning Representations. https://arxiv.org/abs/2210.03629
[39] Gyeong-In Yu, Joo Seong Jeong, Geon-Woo Kim, Soojoong Kim, and Byung-Gon Chun. 2022. Orca: A Distributed Serving System for Transformer-Based Generative Models. In 16th USENIX Symposium on Operating Systems Design and Implementation. USENIX Association, 521–538. https://www.usenix.org/conference/osdi22/presentation/yu
[40] Yunxiao Zhao and Changxiao Cai. 2026. Training Parallel Speculative Draft Models by Directly Minimizing Expected Decoding Rounds. arXiv:2610.10411 [cs.LG] https://arxiv.org/abs/2610.10411
[41] Lianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Sun, Jeff Huang, Cody Hao Yu, Shiyi Cao, Christos Kozyrakis, Ion Stoica, Joseph E. Gonzalez, Clark Barrett, and Ying Sheng. 2024. SGLang: Efficient Execution of Structured Language Model Programs. In Advances in Neural Information Processing Systems, Vol. 37. Curran Associates, Inc., 62557–62583. doi:10.52202/079017-2000
[42] Shuyan Zhou, Frank F. Xu, Hao Zhu, Xuhui Zhou, Robert Lo, Abishek Sridhar, Xianyi Cheng, Tianyue Ou, Yonatan Bisk, Daniel Fried, Uri Alon, and Graham Neubig. 2024. WebArena: A Realistic Web Environment for Building Autonomous Agents. In The Twelfth International Conference on Learning Representations. 15585–15606. https://proceedings.icsl.cc/paper_files/paper/2024/hash/4410c0711e9154a7a2d26f9b3816d1ef-Abstract-Conference.html
[43] Yongchao Zhou, Kaifeng Lyu, Ankit Singh Rawat, Aditya Krishna Menon, Afshin Rostamizadeh, Sanjiv Kumar, Jean-François Kagy, and Rishabh Agarwal. 2024. DistillSpec: Improving Speculative Decoding via Knowledge Distillation. In The Twelfth International Conference on Learning Representations. 32011–32050. https://proceedings.icsl.cc/paper_files/paper/2024/hash/8766fbc68e1ed71cdef712ce273e0a363-Abstract-Conference.html
A Model Configuration and Execution Protocol
All runs use the target-specific Qwen3 tokenizer and non-thinking chat template for prefix measurement and generation. DFlash, EAGLE-3, and DSpark load the released DeepSpec checkpoint families matched to each target size, with seven-token draft blocks or the corresponding EAGLE-3 configuration. Confidence-based early stopping is disabled for DSpark. LongSpark uses the target-specific Hehy checkpoints [11], and DLite uses the SJTU-DAI-Sys checkpoints [34]. Section 4.1 specifies generation limits and timing scopes. Dynamic task selection uses seed 980406; reflection occurs every five steps. Each replay invocation retains the saved history and tool observations, using the same tokenization conventions as dynamic execution.
B Corpus Provenance and Interaction Coverage
Table 8 summarizes the 5,795 training and 1,380 test source tasks. Nominal context strata of 2k, 4k, 8k, 16k, and 32k contribute 18%, 20%, 23%, 21%, and 18% of each split; evaluation and state assignment
Table 8: Source composition of the constructed trajectory corpus.
| Source | Training | Test |
|---|---|---|
| DeepResearch-traj [14] | 5,000 | 1,250 |
| Nebius SWE-agent [25] | 3,806 | 972 |
| R2E-Gym SFT [27] | 1,031 | 243 |
| R2E-Gym testing agent [28] | 163 | 35 |
use actual tokenized lengths. Both splits cover all 40 domain, context, and phase combinations. Median test-history message counts are 30 for Web research and 20 for software engineering; median tool-message counts are nine in both domains. Tool messages contribute 80.4% and 57.1% of aggregate test-prefix characters, respectively. Decision histories enable analysis of how similar context lengths accompany different prediction requirements. Joint workload and phase coverage permits these conditions to be examined within shared context strata, while saved tool observations preserve the evidence available when the next assistant continuation is generated. Corpus quotas select decision states; assistant-turn expansion defines supervision candidates while evaluation retains the curated test distribution.
Task isolation. Collection-qualified query identifiers define browsing tasks; hashes of problem text after scaffold removal identify software tasks. Deterministic task hashing assigns an 80%/20% training/test split before assistant-turn expansion, keeping each task's rollouts together. Source-task intersection is zero. Qwen3-4B token 3-gram checks, normalized by the test-question 3-gram count, find zero training/test pairs with overlap at least 0.5. BrowseComp-Plus query identifiers and corpus task identifiers use distinct namespaces; question-text comparisons therefore assess overlap independently of numerical identifiers. Cross-checking all 824 BrowseCompPlus queries against 3,769 browsing tasks from both partitions yields a maximum query-normalized overlap 0.1818, below the 0.2 threshold. All 500 SWE-bench Verified instances are excluded before splitting through task-key and original-label matching. The training partition supplies adaptation and scheduling feedback; development tasks reserved within this split before segment generation guide hyperparameter selection. Replay and dynamic tasks serve only post-training evaluation.
C Supplementary Results and Paired Estimation
Table 9 extends the dynamic comparisons in Section 4 to T = 1. Tables 10 and 11 extend the Qwen3-4B results in Table 7 to 8B and 14B, retaining the same metrics and runtime grouping. Across all target sizes and temperatures, TraceSpec increases replay verification yield over DSpark by 8.4 to 11.2 percentage points. Greedy dynamic throughput improves by 1.4% to 5.5% across the six workload and target-size settings. Among the released baselines, DSpark replay acceptance exceeds the strongest alternative by 7.3% to 25.1%; the largest gain occurs at 8B and T = 1 against DFlash, with a pointwise 95% interval of 21.9% to 28.3%.
Table 9: Dynamic acceptance at T = 1. Metric and highlighting follow Table 4.
| Target | Phase | BrowseComp-Plus | SWE-bench Verified | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EAGLE-3 | DFlash | LongSpark | DLite | DSpark | TraceSpec | EAGLE-3 | DFlash | LongSpark | DLite | DSpark | TraceSpec | ||
| Qwen3-4B | Plan | 3.168 | 2.813 | 3.072 | 2.528 | 3.471 | 3.614 | 3.454 | 3.247 | 2.800 | 2.459 | 3.934 | 3.987 |
| Act | 3.878 | 3.263 | 3.074 | 2.554 | 4.146 | 4.228 | 4.423 | 3.800 | 3.069 | 2.510 | 4.841 | 5.246 | |
| Reflect | 4.032 | 3.194 | 2.894 | 2.532 | 4.160 | 4.361 | 4.592 | 3.847 | 2.664 | 2.540 | 4.845 | 5.054 | |
| Answer | 3.620 | 3.172 | 3.736 | 2.561 | 4.200 | 4.289 | 2.949 | 2.647 | 3.034 | 2.505 | 3.426 | 3.713 | |
| Qwen3-8B | Plan | 3.036 | 3.021 | 3.175 | 2.790 | 3.639 | 3.583 | 2.495 | 2.556 | 2.539 | 2.397 | 3.016 | 3.044 |
| Act | 2.965 | 2.895 | 2.813 | 2.574 | 3.481 | 3.613 | 3.379 | 3.038 | 2.953 | 2.465 | 3.891 | 4.119 | |
| Reflect | 3.064 | 2.916 | 2.820 | 2.576 | 3.588 | 3.745 | 3.150 | 2.949 | 2.592 | 2.465 | 3.713 | 3.974 | |
| Answer | 3.141 | 3.115 | 3.380 | 2.719 | 3.792 | 3.861 | 2.733 | 2.762 | 2.938 | 2.631 | 3.470 | 3.696 | |
| Qwen3-14B | Plan | 2.975 | 2.936 | 3.236 | 2.758 | 3.580 | 3.484 | 2.675 | 2.563 | 2.712 | 2.412 | 2.952 | 3.091 |
| Act | 2.957 | 3.198 | 2.950 | 2.599 | 3.712 | 3.859 | 3.406 | 3.502 | 2.993 | 2.448 | 3.966 | 4.404 | |
| Reflect | 3.072 | 3.372 | 3.213 | 2.785 | 3.969 | 4.199 | 3.011 | 3.097 | 2.852 | 2.557 | 3.592 | 3.902 | |
| Answer | 3.336 | 3.786 | 3.886 | 2.814 | 4.637 | 4.519 | 2.797 | 3.099 | 3.175 | 2.704 | 3.753 | 3.804 | |
Table 10: Verification yield R (%) for Qwen3-8B and 14B, extending Table 7. Bold marks column maxima within each target.
| Target | Drafter | BrowseComp-Plus | SWE-bench Verified | TraceSpec-Traj | |||
|---|---|---|---|---|---|---|---|
| T = 0 | T = 1 | T = 0 | T = 1 | T = 0 | T = 1 | ||
| Qwen3-8B | DFlash | 48.9 | 37.1 | 50.4 | 37.2 | 44.1 | 36.6 |
| EAGLE-3 | 49.9 | 38.1 | 54.0 | 40.2 | 42.5 | 35.9 | |
| LongSpark | 39.2 | 36.5 | 39.6 | 35.5 | 39.2 | 35.9 | |
| DLite | 36.3 | 33.1 | 33.3 | 31.1 | 33.2 | 32.0 | |
| DSpark | 54.9 | 45.0 | 56.9 | 47.2 | 50.3 | 45.9 | |
| TraceSpec | 55.3 | 44.7 | 58.6 | 48.3 | 59.4 | 54.3 | |
| Qwen3-14B | DFlash | 55.8 | 40.7 | 49.9 | 41.8 | 45.2 | 40.2 |
| EAGLE-3 | 50.4 | 38.1 | 49.0 | 40.7 | 40.8 | 35.2 | |
| LongSpark | 43.2 | 38.6 | 40.1 | 36.9 | 38.3 | 36.1 | |
| DLite | 37.6 | 33.9 | 33.1 | 31.6 | 32.4 | 31.2 | |
| DSpark | 61.5 | 48.1 | 55.9 | 47.9 | 50.5 | 47.2 | |
| TraceSpec | 63.4 | 47.7 | 56.2 | 50.9 | 60.4 | 56.1 | |
Temperature also changes the workload encountered during dynamic execution. On BrowseComp-Plus with the 14B target, increasing T from zero to one lowers DSpark acceptance from 4.837 to 3.796 while throughput rises from 25.25 to 30.26 tokens/s. Mean action steps fall from 21.73 to 15.72, mean input length from 13,035 to 9,245 tokens, and episode latency from 143.15 to 91.08 seconds. With fixed replay prefixes, DSpark throughput decreases by 5.9% to 9.0% across target sizes. The replay acceptance reductions for LongSpark and DLite are 5.9% to 10.3% and 3.6% to 4.8%, respectively.
Paired replay intervals compare DSpark with each alternative at matched target sizes and temperatures. Estimation uses 5,000 paired source-task bootstrap replicates with seed 20261021. Decisions from the same source task can span several context strata and execution phases while sharing earlier assistant messages and tool observations. Source-task resampling carries the same multiplicity to every retained decision from a task and to every drafter.
This alignment preserves both dependence across decisions and covariance between methods. Recomputing the pooled ratios within each replicate keeps the interval estimator consistent with the verification-round weighting of the reported means.
D Estimation for Matched Late Actions
The estimates in Table 3 follow the matched-task analysis in Section 3.2.3, using late-action calls from both context intervals. Within each eligible task, emission and verification counters are summed separately for the two intervals. Workload, target size, temperature, phase, and the late-stage threshold remain fixed. Bootstrap replicates resample tasks while carrying both interval totals for every selected task. Each replicate first recomputes the two pooled acceptance ratios and then takes their difference. This preserves the dependence between observations from the same task and weights each interval by its verification rounds. The resulting interval estimates the contrast among tasks represented in both conditions.
Zhao et al.
Table 11: Generation throughput (output tokens/s) for Qwen3-8B and 14B. Timing scope and highlighting follow Table 7.
| Target | Drafter | BrowseComp-Plus | SWE-bench Verified | TraceSpec-Traj | |||
|---|---|---|---|---|---|---|---|
| Qwen3-8B | DFlash | 42.96 | 51.35 | 48.95 | 49.18 | 37.02 | 31.07 |
| EAGLE-3 | 40.33 | 41.20 | 45.98 | 41.32 | 32.68 | 27.81 | |
| DLite | 34.51 | 44.86 | 37.19 | 35.99 | 30.69 | 28.45 | |
| DSpark | 46.79 | 54.94 | 52.63 | 51.93 | 40.44 | 37.06 | |
| TraceSpec | 48.25 | 53.92 | 54.30 | 55.12 | 47.14 | 41.70 | |
| Qwen3-14B | DFlash | 24.41 | 25.80 | 33.86 | 30.61 | 25.81 | 23.72 |
| EAGLE-3 | 20.73 | 22.22 | 29.49 | 28.12 | 21.77 | 19.37 | |
| DLite | 19.73 | 24.29 | 27.04 | 25.76 | 20.58 | 20.00 | |
| DSpark | 25.25 | 30.26 | 35.58 | 35.73 | 27.36 | 25.74 | |
| TraceSpec | 26.60 | 29.67 | 36.09 | 35.14 | 31.12 | 29.60 | |
E Adaptive Scheduling and Training Controls
Training segments and state estimation. Each tool observation remains associated with its executed call. Segments preserve actual prefix lengths and preceding tool events, and repeated decision positions are consolidated. State estimates pool statistics over length, phase, workload, and tool state, then over length, phase, and workload; length and workload; and finally the global pool. The number of distinct training trajectories determines which pooling level has adequate support. In Equation 4, measures decayed visits to segment and controls the weight placed on its own estimate. Thus, trajectory counts determine pooling granularity, while visit counts determine shrinkage. Segment means enter group statistics with equal weight, and unvisited segments inherit the group mean. State-conditioned estimates distinguish disagreement associated with different decision roles within the same length stratum. Their updates follow the changing draft, so supervision priorities can shift as some segments become better aligned. The common effective-event budget makes these changes interpretable as a redistribution of supervised predictions across the trajectory.
Epoch-wise allocation updates. Allocation remains fixed within each epoch. The first epoch uses base shares and records acceptance gaps and effective prediction counts. At each epoch boundary, this feedback updates segment and group estimates, supervision shares, and event-normalized sampling probabilities through Equations 4 to 7. The next epoch uses these probabilities with the unchanged distillation objective.
Coverage and allocation bounds. Equation 6 combines two normalized distributions, giving . Its nonnegative adaptive component ensures for every candidate segment. Equal smoothed gaps yield equal clipped scores, recovering the base allocation . Clipping limits the ratio between adaptive multipliers, and the base component provides a lower bound on exposure for each represented state.
Expected supervision shares. Let be the expected effective-event count for a visit. When the estimate equals , the expected event
share is
Writing , Equation 7 gives . Summing across segments gives and establishes Equation 9. Hence specifies the expected share of supervised predictions, whereas determines how often a segment is visited. Segments supplying more predictions per visit need fewer visits to attain the same share. Actual training masks determine cumulative budget consumption, including the complete final update; reusing a prediction in a later visit counts as another event. The fixed and adaptive conditions use the same event accounting, sampling conversion, and loss normalization, with controlling the difference in training exposure.
Qwen3-4B training and resource use. The complete Qwen3-4B run adapts DSpark block-7 for three epochs and 9,361 optimizer updates, with packed sequences of 32,768 tokens and a fixed 512-anchor cap. Fused AdamW uses a learning rate , zero weight decay, cosine decay, and a 0.04 warmup fraction. Distillation weights are 0.1 for cross entropy and 1.8 for total variation, with confidence-head coefficient 1.0 and gradient norm clipping at 1.0. Master weights use FP32; hidden states and autocast use BF16. Data sampling and training seeds are 20260901 and 42; shrinkage strength is . One A800 80GB GPU trains the draft and a second serves target hidden states using vLLM 0.18.0. This run takes 9 h 42 min 26 s for training, validation, and on-demand target service, corresponding to 19.41 GPU hours of wall-clock allocation.
Scheduler settings and ablation controls. The scheduler sets , clips relative gaps to , and updates allocation once per epoch. Base quotas are equal across the five represented length strata, with equal workload shares. Smoothing and support parameters are selected on the development partition and fixed before evaluation. and TraceSpec share the segment population, event accounting, and distillation objective; the allocation changes from to .
In , the global mean replaces while the segment mean, visit support, and shrinkage weight remain unchanged. In , individual gaps are averaged over valid prediction positions; subsequent smoothing, clipping, and sampling follow the full method. In Equation 3, an early overlap contributes to several prefix products, so early disagreement reduces estimated agreement across the remaining positions within the block. A position-wise average
assigns separate contributions to those gaps. The comparison therefore examines whether retaining this ordering improves the distribution of supervision across candidate segments. Inference settings, hardware, and concurrency are fixed across ablations. Replay supplies identical histories, aligning their acceptance measurements at common decision boundaries.