TT Lab
Blog

한국어 English 日本語 中文

Get started
Blog

Blog

Speculative Decoding: Hit Four Times, Miss and Lose

Status: Draft (2026-10-27), n-gram measured, EAGLE, MTP, and suffix unmeasured. Measured on 2026-10-27 using a single 8GB-class laptop GPU (Ada generation), vLLM 0.31.0, and Qwen3-Reranker-0.6B. Model-based methods (EAGLE, MTP, draft models) require downloading draft weights, and the suffix method requires downloading a new additional package, so they were not measured this time. Added on 2026-10-27. The results re-measured with the conversational Qwen3-0.6B and vLLM 0.32.0 have been added to Section 3-1. The figures for 0.31.0 and the reranker model remain unchanged. Writing Rules: Measured data is the default; unmeasured items are marked as "Unmeasured", and unverified items are marked as "Unverified".

Table of Contents

1. Principle: Guess and Verify at Once

A decode step spends most of its time reading weights from memory (Part 2). However, whether you check one token or five tokens in a single step, the amount of weight read is the same. Therefore, you can cheaply guessthe next few tokens, and have the large model validate the entire draft in a single step.

초안(싼 방법): " keeps a queue of"        ← 4토큰 제안
검증(큰 모델 한 걸음): " keeps" ✓ " a" ✓ " queue" ✓ " of" ✓ + 다음 토큰 하나
→ 한 걸음에 5토큰 확정

It stops at the first incorrect token, replacing that position with the token chosen by the large model. Thus, at least one token is always gained per step. In sampling (temperature > 0), rejection sampling preserves the same distribution as the large model alone, while in greedy decoding, the output must be identical. Leviathan et al. (ICML 2023) reported 2x to 3x speedups on T5-XXL without altering outputs, and Chen et al. (DeepMind, 2023) reported 2x to 2.5x speedups in a distributed environment on Chinchilla 70B (based on the abstract).

The gains are determined by two figures:

Therefore, the official documentation introduces speculative decoding as a feature to "reduce inter-token latency at medium-to-low request rates and memory-bound workloads."

2. Draft Methods in vLLM

Method Draft Generation Prerequisites Documentation Evaluation (Qualitative) Paper-reported Values (Abstract)
n-gram(ngram, ngram_gpu) Finds identical token sequences in the prompt and previous output and copies the following tokens None Low to medium at low request rates Prompt Lookup Decoding: Average 2.4x on a single A100, Mistral-7B, summarization/context QA
suffix(suffix) Builds a suffix tree from prompts and previous request outputs, proposing varying lengths based on frequency arctic-inference Package Low to medium, strong in tasks with high repetition SuffixDecoding: Up to 5.3x in agent tasks (SWE-Bench, Text-to-SQL)
EAGLE·EAGLE-3(eagle, eagle3) A small head that takes hidden states from the large model to emit the next tokens Trained draft head High EAGLE: 2.7x to 3.5x on LLaMA2-Chat 70B. EAGLE-3: Up to 6.5x
MTP(mtp etc.) Multi-token prediction head natively present in the model Models with MTP (DeepSeek-V3, Qwen3.5, etc.) High
Draft Model(draft_model) Smaller model with the same vocabulary Small model High

Configurations are provided as a single JSON.

vllm serve <모델> --speculative-config '{"method":"ngram","num_speculative_tokens":4,"prompt_lookup_min":2,"prompt_lookup_max":5}'

The n-gram prompt_lookup_max·min is the length range of the token sequence to find; if both are omitted, it defaults to 5. In 0.32.0, Model Runner V2 introduced a length-varying GPU n-gram proposer. In 0.31.0, ngram_gpu was already an option, but in actual measurements, both methods issued a warning stating, "Model Runner V2 does not yet support this method, using the V1 executor." The CPU version ngram also issued a warning stating, "Disabling asynchronous scheduling."

Some features cannot be used together. The compatibility table in the 0.32.0 documentation notes that speculative decoding cannot be used with LoRA, pooling models, and prompt embedding inputs, and warnings were logged indicating that min_p and logit_bias are ignored.

3. Direct Measurement

Method

Result 1. Single User: Four to Six Times Faster When Copying

Workload (Concurrency 1) Default n-gram k=2 n-gram k=4 n-gram k=8 GPU n-gram k=4
Copying, tok/s 176.4 427.5 (2.4x) 704.1 (4.0x) 1,117.0 (6.3x) 669.5 (3.8x)
Copying, Acceptance Rate 97.7% 99.0% 95.8% 95.3%
Word chaining, tok/s 175.6 524.7 (3.0x) 515.8 (2.9x)
Word chaining, Acceptance Rate 90.8% 67.9%

For k=4, the server was launched separately twice (692.6, 704.1 tok/s) and yielded nearly identical values. When increasing proposals to 8 in copying, an average of 7.7 out of 8 drafts matched, confirming about 8.7 tokens per step including the extra token appended by the large model. However, throughput was 6.3x instead of 8.7x. This means the step validating 9 tokens simultaneously was about 1.4x longer (7.8 ms) than a normal step (5.7 ms). Even with a single weight read, increasing the tokens to validate increases computation and attention.

"Word chaining" also being three times faster is because this model repeats identical words (e.g., signal river meadow signal river meadow …). General conversational models likely wouldn't match this.

Result 2. Random Output: Varies by Prompt

Random output at temperature 1.0 varies significantly by prompt, so results are listed per batch (concurrency 1, tok/s).

Prompt Default k=2 k=4 (Accepted) k=8
1 171.4 242.4 237.6(113/430) 397.6
2 171.3 384.0 596.5(202/208) 914.2
3 171.4 149.2 153.6(22/175) 139.9

Result 3. Increasing Concurrency Reduces Gains, and Random Output Causes Losses

Workload Concurrency Default tok/s n-gram k=4 tok/s Ratio Acceptance Rate
Copying 8 1,124.6 2,860.6 2.54 97.1%
Copying 32 2,868.7 4,042.9 1.41 83.4%
Word chaining 8 1,089.7 2,478.3 2.27 92.1%
Random word input, stress test (same conditions as Part 2) 16 1,683.1 2,436.5 1.45
Random word input, stress test 64 2,899.3 3,267.8 1.13
Random output 8 1,072.0 950.4 0.89 58.2%
Random output 32 2,590.8 2,239.8 0.86 51.4%

As the batch size increases, the GPU is already busy, so steps lengthen proportionally to the increase in tokens to validate. Even for copying, which has a high acceptance rate, the gain dropped to 1.41x at concurrency 32, and random output, with an acceptance rate around 50%, suffered an 11% to 14% loss at concurrencies 8 and 32. The document's explanation that "gains diminish at high request rates" is borne out by the numbers.

Result 4. Output and Cost

3-1. Re-measurement on 2026-10-27: Conversational Model and 0.32.0

The previous measurements used a reranker model that tended to repeat phrases, favoring n-grams. Measurements were retaken using conversational Qwen3-0.6B (bf16) and vLLM 0.32.0 across four workloads.

Task Concurrency Base tok/s n-gram k=4 tok/s Ratio Acceptance Rate
Copy 1 176.3 656.0 3.72 87.3%
Return Code 1 177.7 544.2 3.06 69.7%
Return Code 8 1,288.6 3,252.8 2.52 69.7%
Explain 1 178.6 173.9 0.97 3.0%
Explain 8 1,163.5 1,141.5 0.98 3.6%
Random Output 1 171.9 197.3 1.15 13.0%
Random Output 8 1,074.7 961.9 0.90 18.0%

4. When to Enable

5. What Was Not Verified

References

Sign in to like

Comments

No comments yet.

Sign in to leave a comment