arXiv:2611.05611cs.AINov 2026

Manuscript Offprint

arXiv:2611.05611

Hybrid Spark: Adaptive Speculative Decoding That Lets the Content Choose the Drafter

Ekagra Ranjan, Bharat Venkitesh

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Speculative decoding (SD) speeds up large language model (LLM) serving, but its gain depends on the workload's shape, such as batch size and context length, and on its content. A model-based drafter proposes a short block on any content, while a model-free drafter such as n-gram lookup proposes long copies at almost no cost when the output repeats its input, as in code editing. Adaptive verification spends a batch-wide verification budget on the draft tokens most likely to be accepted, but it supports only one model-based drafter. Model-free drafters provide no per-token confidence, so they cannot take part in budget allocation, and deployments must either fix one drafter or split their GPUs between drafters. We present Hybrid Spark, a framework that runs a model-based and a model-free drafter on every step and gives each request the better of their chains, within adaptive verification and entirely on the GPU, which keeps asynchronous scheduling intact. The key idea is a price per verified draft token: the goodput that slot would earn elsewhere in the batch. Once the model-free drafter's tokens carry calibrated acceptance estimates, fit once on general text, this price puts both drafters' chains on one scale. Instantiated with DSpark and an n-gram drafter in vLLM, Hybrid Spark achieves 1.10–1.62× the output throughput of DSpark on code editing at batch size 4 and 1.04–1.27× at batch size 128, while staying at 0.97–1.01× of it on chat at temperature 0. A single deployment can therefore serve both workloads.

1 Introduction

Decoding dominates the cost of serving large language models (LLMs). At each step, the model reads its weights and KV cache to produce one token per request, leaving much of the available compute idle in memory-bound regimes (Pope et al., 2023). Speculative decoding (SD) (Leviathan et al., 2023; Chen et al., 2023) exploits this idle compute: a cheap drafter proposes several tokens, and the target model verifies them in a single forward pass while preserving the output distribution. The benefit depends on how many tokens are accepted relative to the cost of drafting and verification.

This tradeoff changes with both batch size and content. At small batch sizes, verifying additional tokens is relatively cheap, and longer drafts can substantially improve throughput. As the batch grows, verification becomes more expensive, and verifying too many tokens can make SD slower than vanilla decoding (Liu et al., 2026c; 2024). Adaptive verification, as in TurboSpec (Liu et al., 2024), DSpark (Cheng et al., 2026), and D-cut (Liu et al., 2026b), addresses this problem by adjusting the verification budget at each step and allocating it to draft tokens most likely to be accepted. The budget also responds to content: low-entropy domains such as coding and math tend to accept longer drafts than roleplay or creative writing (Abramovich et al., 2026).

Yet adaptive verification assumes that the drafter has already been chosen. It decides how much of a draft to verify, but not which drafter should produce it. This distinction matters because different drafters exploit

Figure

Figure 1. The best drafter depends on content, and Hybrid Spark tracks the better one. Output-throughput speedup over vanilla decoding on NextCoder (Qwen3-4B), by edit distance between the input program and the model's output (higher is better). The n-gram drafter outperforms DSpark only on near-copies, and verifying all of its drafts (n-gram) at BS 128 is slower than vanilla decoding from 35% edit distance up. N-gram + AV gives it adaptive verification with our estimator. Table 11 in the appendix lists the values.

different kinds of predictability. Model-based drafters learn to predict the target's continuation and work across general text. Model-free drafters instead exploit repetition, copying tokens from the prompt or previously generated text. The best drafter therefore depends not only on how predictable the next tokens are, but also on where that predictability comes from.

Code editing makes this difference particularly clear. Given an existing program and a request to modify it, the model often reproduces large portions of the original code, changing only a few regions. A model-based drafter can predict these tokens, but its draft length is limited. An n-gram drafter can instead copy much longer continuations directly from the prompt, at little cost. On the NextCoder code-editing workload with Qwen3-4B at batch size (BS) 4, DSpark, which drafts seven tokens per step, achieves 4.17–5.00× speedup over vanilla decoding across edit distances from 0% to 70%. An n-gram drafter that proposes up to 15 tokens achieves 7.42× speedup when the output is nearly identical to the input, but falls to 1.80× on heavy rewrites (Figure 1). Neither drafter is uniformly better: copying wins when the output repeats the input, while model-based drafting is more robust when the output changes substantially.

This creates a practical problem for serving systems. A deployment serving both editing and general requests must either choose one drafter for all traffic or maintain separate deployments for different workloads. The former leaves performance on the table: using DSpark everywhere misses the gains from copying on light edits. The latter fragments GPU capacity across pools whose traffic varies over time, requiring each to be provisioned for its own peak. Ideally, a single deployment would use the better drafter for each request, and adapt that choice as generation progresses.

Combining drafters, however, is not as simple as running both and taking the longer draft. The two drafters produce different kinds of predictions, compete for the same verification budget, and must be compared at every decoding step without introducing overhead. This raises three challenges:

  • (C1) Estimating acceptance for model-free drafts. Model-based drafters provide token confidences, but an n-gram match only identifies a possible continuation, not how likely the target is to accept it. Without acceptance estimates, model-free drafts cannot participate in adaptive verification or be compared with model-based drafts.

  • (C2) Choosing between competing draft chains. Each request now has two candidate chains that may agree, diverge, or differ entirely. Verifying both requires tree attention or increases verification cost, while choosing one requires a common scale and a price that reflects the rest of the batch. Existing

hybrids (Oliaro et al., 2025) select the model-free chain when its score exceeds a fixed threshold, ignoring both the changing cost of verification and what other requests could gain from the same slots.

  • (C3) Making the decision practical at serving scale. Drafter selection must run at every decoding step, entirely on the GPU and at negligible cost, without host-device synchronization. Otherwise, it undermines asynchronous scheduling and CUDA graph execution. Existing CPU-based hybrid approaches (Oliaro et al., 2025) incur this synchronization. The system must also preserve the target model's output distribution.

Our key observation is that adaptive verification already prices each draft token: a verified slot costs the marginal goodput it could earn elsewhere in the batch. If every proposed token carries an acceptance estimate on a common scale, chains from different drafters can be compared by their expected benefit at this price, which makes drafter selection and budgeting one decision. Building on this observation, Hybrid Spark combines a model-based and a model-free drafter within one adaptive-verification system. The model-free drafter receives calibrated acceptance estimates from cheap features, fit once by replaying target-model outputs on general text. At each step, Hybrid Spark selects a chain for each request at the common price and allocates the batch's budget across the selected chains, all on the GPU and without changing the output distribution.

We instantiate Hybrid Spark with DSpark and a GPU n-gram drafter in vLLM (Kwon et al., 2023), and evaluate it across five models, seven workloads, and three batch sizes. Across five code-editing workloads, Hybrid Spark achieves 1.10–1.62× the output throughput of DSpark at BS 4 and 1.04–1.27× at BS 128, while remaining at 0.97–1.01× of DSpark on chat at T=0. The gains follow how much of the output can be reused: on NextCoder, light edits (15–20% edit distance) achieve 1.28–1.33× at BS 4, while heavy edits (60–70%) achieve 1.03–1.12× (Figure 5). A single deployment thus gains from copying when the output repeats its input and remains robust on general text.

The same split between learned prediction and reuse appears in reinforcement learning (RL) post-training. Rollout generation dominates training time, and generations from the same prompt often overlap across adjacent epochs (Liu et al., 2025a; He et al., 2025). As short rollouts finish, a few long generations at small effective batch size determine step time (Shao et al., 2026), which is where cheap copying helps most. History-based drafters exploit this overlap (He et al., 2025; Shao et al., 2026), while a model-based drafter can go stale as the policy changes (Shao et al., 2026). Hybrid Spark's model-free slot can hold such a drafter, and we leave RL rollout generation to future work.

Our contributions are: (1) a characterization of how drafter choice depends on content and batch size (Section 3); (2) a recipe for calibrating model-free drafts using offline replay and a per-position logistic estimator, instantiated for n-gram drafting and shown to transfer across datasets and models (Sections 4.2 and 5.5); (3) a drafter-agnostic chain-selection rule based on the marginal goodput of verification slots, integrated with adaptive verification entirely on the GPU, including an analysis of stale budget sizing (Sections 4.3, 4.4 and 5.7); and (4) lossless alternative policies for probabilistic drafting and an evaluation of the DSpark + n-gram instantiation across models, workloads, batch sizes, and temperatures (Sections 4.5, 5 and H).

References (62)