Research · Engineering
Why make an AI write the same sentence from scratch 1,000 times?
A speculative drafter for records, tool calls and scripted replies, timed against SuffixDecoding and EAGLE-3 on the same requests: 13.2× decode on Loghub with Llama 3.1 8B, 16.1× with Qwen3-8B, outputs identical under deterministic kernels.
The result, explained
10.4×
faster end-to-end processing of log records
Llama 3.1 8B on Loghub · 10.36× measured
Repetitive structured outputs; open chat was slower.
Speculative decoding for outputs that repeat
Llama 3.1 8B, Qwen3-8B, Qwen3-30B-A3B · vLLM 0.28 · one A100 · temperature 0 · October 6–7, 2026
Loghub log parsing, Llama 3.1 8B
13.2×
decode; 10.4× end to end, prefill included
The same stream, Qwen3-8B
16.1×
decode; 12.5× end to end
Best public drafter on the same lines
4.2×
SuffixDecoding; EAGLE-3 2.4×
Outputs identical to plain decoding
300 / 300
deterministic kernels; 178 / 178 voice turns
Once the prompt is read, a long answer spends its time in decode: one forward pass per output token, each of them reading every weight in the model. On an A100-40GB, Llama 3.1 8B in bf16 decodes about 78 tokens a second for a single request, 12.7 ms a token. Speculative decoding attacks that. A cheap drafter guesses the next several tokens, the model checks all of them in one pass, and every token it would not have produced itself is thrown away, so the output is the model’s own. The speedup is the number of tokens accepted per pass, divided by what a pass costs.
Public drafters split into two families. Trained draft heads (EAGLE-3, DFlash) predict the next tokens from the model’s own features and give a steady 2–4× on general text. Copy-based drafters (vLLM’s prompt lookup, SuffixDecoding) propose text that already appeared in the prompt or in earlier outputs, which is cheap and works when the output repeats something verbatim. A large share of production traffic sits between the two: records, tool calls and scripted replies whose structure repeats from request to request while the values change every time. That is the traffic we built our drafter for.
Log parsing, a public benchmark
Loghub collects real logs from production systems. The task is the one every log pipeline runs: turn each raw line into a structured record with its event type and parameters. We streamed 600 consecutive lines each from OpenSSH, Hadoop and HDFS, 1,800 lines in all, one source per stream as a pipeline reads them, and timed every drafter on the same lines against plain decoding.
Loghub, 1,800 lines, Llama 3.1 8B: decode speedup over plain decoding
| Loghub, 1,800 lines | Decode, pooled | End to end, pooled | Per-request median | Identical, default kernels |
|---|---|---|---|---|
| Our drafter, Llama 3.1 8B | 13.23× | 10.36× | 23.5× | 77% |
| SuffixDecoding, Llama 3.1 8B | 4.20× | 4.01× | 4.2× | 80% |
| Our drafter, Qwen3-8B | 16.06× | 12.49× | 33.1× | 94% |
| SuffixDecoding, Qwen3-8B | 4.94× | 4.71× | 94% |
The pooled figure is the one to quote: it is the total time saved. The per-request median is higher because many records are drafted whole and verified in one or two passes. End to end includes reading the prompt, which no drafter speeds up, and still clears 10× on both models. By source, Llama 3.1 8B ran 13.2× on OpenSSH, 13.8× on Hadoop and 10.6× on HDFS with drafts capped at 64 tokens; Qwen3-8B, at 96, ran 14.1×, 17.4× and 16.3×. Qwen writes each record as one line of compact JSON (129 tokens on average), which is close to the ideal case.
Interleaving six systems in one stream, 1,200 lines, is harder: a record’s neighbours come from other formats. The drafter still ran 10.30× in decode and 8.36× end to end, against 4.18× and 3.99× for SuffixDecoding and 2.51× and 2.40× for EAGLE-3. Plain decoding took 1,381 ms per record of 108 tokens, 31 ms of it to the first token.
| Loghub interleaved, 1,200 lines | Decode, pooled | End to end | Per-request median |
|---|---|---|---|
| Our drafter, drafts up to 96 tokens | 10.30× | 8.36× | 28.2× |
| Our drafter, up to 64 | 9.92× | 8.12× | 20.1× |
| Our drafter, up to 40 | 9.55× | 7.91× | 18.1× |
| SuffixDecoding | 4.18× | 3.99× | 4.5× |
| EAGLE-3 | 2.51× | 2.40× | 2.5× |
Lossless, checked rather than assumed
Speculative decoding is lossless in principle and almost never byte-identical in practice. With vLLM’s default bf16 kernels the result of a matrix multiply depends slightly on the batch shape, and a pass that verifies 40 tokens has a different shape from a one-token step, so near-ties between two candidate tokens occasionally resolve the other way. That is why 77–94% of outputs above match plain decoding, and why SuffixDecoding, a drafter built into vLLM, shows the same rates. To separate the drafter from the kernels we reran with vLLM’s batch-invariant kernels (VLLM_BATCH_INVARIANT=1), under which output cannot depend on the shape of a pass: 300 of 300 Loghub records and 178 of 178 voice-agent turns were identical to plain decoding, at 12.96× and 11.46× in decode. Batch-invariant kernels are about 2.7× slower in absolute terms; every other speedup here uses the default kernels.
Mixture of experts
The same 600 lines on Qwen3-30B-A3B (FP8 weights) ran 4.83× in decode and 4.18× end to end with drafts up to 40 tokens, against 1.63× for SuffixDecoding. The drafter was as accurate as on the dense models; the pass was not as cheap. Plain decoding on this model is fast, 7.0 ms a token, because each token reads only about 3B of the 30B parameters. A pass that verifies a long draft routes its tokens to many different experts and reads far more of the weights, about 31 ms at 96 tokens. On a mixture of experts the best draft length is shorter: 4.36× at 16 tokens, 4.66× at 24, 4.83× at 40 and 4.03× at 96.
Agents, tools and dialogue
The same comparison across nine workloads, from our own scripted voice agent to public tool-calling, text-to-SQL, data-to-text, code-editing and dialogue benchmarks, all on Llama 3.1 8B with the same requests for every drafter. The right-hand column is how often an output has the structure of an earlier output with different values, measured from plain decoding’s own outputs before any drafter runs.
Decode speedup by workload, Llama 3.1 8B (per-request median)
| Workload | Ours | 95% interval | SuffixDecoding | EAGLE-3 | Repeated structure |
|---|---|---|---|---|---|
| Voice agent, 1 caller (scripted) | 9.90× | 8.59–10.03× | 2.81× | 3.73× | 80% |
| Voice agent, 16 callers | 3.47× | 3.09–4.05× | 2.02× | 2.75× | 78% |
| API-Bank tool calls | 3.65× | 3.30–4.27× | 2.46× | 2.54× | 34% |
| E2E NLG | 3.46× | 3.29–3.60× | 2.23× | 2.55× | 3% |
| CanItEdit | 3.07× | 2.17–3.94× | 3.72× | 3.22× | 0% |
| Spider | 1.99× | 1.84–2.18× | 1.77× | 1.77× | 21% |
| τ-bench retail | 1.32× | 1.26–1.36× | 1.54× | 1.43× | 12% |
| MultiWOZ | 1.02× | 1.00–1.03× | 1.16× | 2.06× | 8% |
| Open chat | 0.76× | 0.73–0.77× | 0.92× | 2.63× | 0% |
| Loghub stream (pooled, above) | 13.23× | 4.20× | 2.38× | 79% |
The pattern is the design. Where three-quarters or more of outputs repeat an earlier structure, the voice agent and the log streams, the drafter runs at 10–13× for a single request, about three times the best public drafter. With 16 voice callers sharing the GPU every drafter gains less, ours 3.5× against 2.8× for EAGLE-3. On tool calls, data-to-text and SQL it still leads, at 2–3.7×. On code edits and τ-bench the copy-based and trained drafters do as well or better, and on free dialogue and open chat a trained draft head is clearly the right tool: a verification pass costs more than a plain step, so a drafter with nothing to draft from is slower than none. Both numbers that decide this, the repeated-structure rate and the drafter’s acceptance rate, can be read from a deployment’s logs before it is switched on, so the drafter is enabled per application.
The voice agent is ours: a scripted appointment-booking agent whose replies follow a fixed script filled with each caller’s details. It ran 10.05×, 9.95× and 9.88× in three separate runs. It is the workload we designed the drafter around, which is why the headline numbers on this page are Loghub’s.
Results reflect the configurations described in this post. Performance varies by model, hardware, traffic, context and application requirements.