How Speculative Decoding Can Raise LLM Speed from About 40 to 120 Tokens/s

    This article explains why standard autoregressive LLM decoding is often limited to tens of tokens per second, how speculative decoding uses a draft model and one-pass verification to accept multiple tokens at once, and which factors—acceptance rate, draft length, KV cache, scheduling, and sampling—determine whether speed can rise from about 40 to nearly 120 tokens/s in a specific setup.

    During large language model inference, generation speed is usually measured in tokens per second. For large models, producing one token often requires a full forward pass. Even with a key-value cache, that step is still constrained by compute, memory bandwidth, and memory-access latency. In single-stream, low-concurrency interactive use, speed may therefore be only a few dozen tokens per second.

    A common optimization is speculative decoding: a faster but weaker small model proposes candidate tokens, and the target model verifies them in one pass. The draft model does not replace the target model. The goal is to reduce how often the target model runs token by token, while keeping the final output distribution essentially the same and raising overall speed.

    1. Why standard autoregressive generation is slow

    Standard LLM generation is strongly serial:

    1. Compute the next token from the current context.
    2. Append that token to the context.
    3. Compute the next token again.
    4. Repeat until generation ends.

    Inference frameworks usually keep a KV cache of past attention results so already processed content is not recomputed. Even so, each new token depends on the previous one, so later tokens cannot be fully parallelized.

    If each target-model token requires a heavy step, dozens of tokens mean dozens of decode rounds. For a large model, each round includes matrix math plus weight reads, cache access, scheduling, and memory synchronization. At low concurrency, GPU compute units may be underused, and the system is more exposed to memory access and scheduling overhead.

    2. How speculative decoding works

    Speculative decoding adds a lightweight draft model. Its job is not to produce the final answer, but to propose several likely tokens quickly. A typical round looks like this.

    2.1 The draft model proposes a candidate sequence

    Given the current context, the draft model predicts several tokens in a row. For a candidate length of N, that sequence is:

    1. t1, t2, t3, ..., tN

    Because the draft model is smaller than the target model, this step is cheaper. N can be tuned for the workload. A longer draft can reduce target-model calls, but errors are also more likely to accumulate.

    2.2 The target model verifies candidates in parallel

    The target model receives the original context plus the N candidates and validates the sequence in one forward pass instead of generating each token alone.

    If the leading candidates match what the target model would predict, they can be accepted. For example, the draft may propose five tokens and the target may accept the first four and reject the fifth. Those four tokens are committed, and generation resumes from the fifth position.

    One verification step can therefore confirm several consecutive tokens rather than only one.

    2.3 Reject bad candidates and resume

    When a candidate fails at a given position, the system rejects that token and every later candidate that depends on it, then resamples or selects a token with the target model at that position. The next round of draft generation and target verification follows.

    The small model’s output is never accepted unconditionally. The target model’s verification decides the final output. The draft model only supplies a possible prefix.

    3. Where the speedup comes from

    Most of the gain comes from two effects.

    3.1 Turning many serial steps into one batched verification

    In the usual path, the target model must run N times to produce N tokens. With speculative decoding, the draft model cheaply proposes N candidates, and the target model processes them together. Verification still costs compute, but it can use more parallelism.

    This changes “run the target model once per token” into “let the draft model explore quickly, then let the target model confirm a batch.” When the two models agree often, each round accepts multiple tokens and the average number of target-model calls falls.

    3.2 Using hardware parallelism more fully

    Single-token decoding of a large model often has a small compute footprint and is dominated by memory access. Verifying several positions at once creates a workload that fits the hardware better and improves the efficiency of matrix math and memory access.

    The speedup is not a fixed multiple of the token count. It depends on the acceptance rate, draft-model time, target-model size, sequence length, batch size, hardware, and the inference stack.

    A reported move from about 40 tokens/s to nearly 120 tokens/s is a result from a specific environment, not a fixed outcome for every device and model. A rigorous benchmark must state model configuration, input length, output length, precision, concurrency, sampling parameters, and hardware.

    4. Metrics that decide the result

    4.1 Candidate acceptance rate

    Acceptance rate is one of the most important metrics. It is the share of draft tokens that the target model ultimately accepts.

    A high rate means the two models have similar predictive distributions on the current task, so more tokens can be confirmed per round. A low rate means frequent rejection. Draft compute may then fail to pay for itself and can even add overhead.

    Acceptance rate is typically affected by:

    • The capability gap between the draft and target models
    • Domain and language style of the input
    • Temperature, randomness, and probability truncation
    • Candidate length
    • Context length and complexity
    • Task type, such as code, translation, question answering, or long-form continuation

    4.2 Draft length

    Longer candidates are not always better. If the draft is too short, the target model is still invoked too often. If it is too long, an early error can spread and cause many later candidates to be rejected.

    In production, draft length is often adjusted from recent acceptance:

    • Increase length when acceptance is high
    • Shorten it when acceptance falls
    • Speculate less aggressively after repeated rejections
    • Reassess the draft strategy when text structure changes

    Dynamic length usually fits complex traffic better than a fixed length.

    4.3 Draft-model cost

    A smaller draft model is not free. If it is slow, or if it spends too much time on context, the end-to-end gain shrinks.

    A useful draft model should:

    • Generate each step clearly faster than the target model
    • Agree with the target model often
    • Reuse the KV cache efficiently
    • Fit a batched verification flow with the target model
    • Avoid heavy scheduling and data-transfer overhead

    Parameter count alone is not enough. What matters is per-round latency and the quality of accepted candidates.

    5. Engineering optimizations that matter

    5.1 KV cache management

    Speculative decoding keeps caches for both the draft model and the target model. If a candidate is rejected, cache state must roll back correctly so a bad token does not pollute later steps.

    An efficient implementation usually needs:

    • Cache reservation
    • Temporary writes for candidate branches
    • Fast rollback after rejection
    • Commit of accepted tokens into the cache
    • Cache isolation across requests

    If copy and rollback are too expensive, they can erase the theoretical gain.

    5.2 Less data movement

    Candidate tokens and related state must move between the draft and target paths. Frequent copies between devices turn communication latency into a new bottleneck.

    Useful directions include:

    • Keep related compute on the same device when possible
    • Avoid unnecessary intermediate tensor copies
    • Use contiguous memory layouts
    • Merge small scheduling operations
    • Run candidate verification and result filtering on device when possible

    5.3 Batch scheduling

    With multiple users, requests can be batched to raise hardware utilization. Batching also brings unequal lengths, different completion times, and cache fragmentation.

    The scheduler has to balance throughput and per-request latency. For online chat, time to first token usually matters more than total throughput. For offline batch jobs, overall tokens per second can take priority.

    5.4 Consistent sampling

    If the draft and target models use very different sampling policies, acceptance can drop sharply. Verification must follow the same sampling rules as the target model, or the output can diverge in a statistical sense.

    Speculative decoding is usually more stable on low-randomness tasks. At high temperature and high randomness, candidate distributions spread out and acceptance can fall.

    6. How to benchmark it properly

    Do not record only a single speed number. At a minimum, track:

    • Time to first token
    • Average generation speed
    • P50, P95, and P99 latency
    • Draft-model time
    • Target-model verification time
    • Average tokens accepted per round
    • Candidate acceptance rate
    • Memory use
    • Performance across input lengths
    • Performance across concurrency levels

    Also run a baseline with speculative decoding off, using only standard autoregressive generation on the target model, on the same hardware and the same inputs.

    A reasonable test plan is:

    1. Fix precision and hardware.
    2. Prepare inputs that cover multiple lengths and task types.
    3. Test short, medium, and long outputs separately.
    4. Increase concurrent requests step by step.
    5. Record acceptance rate and end-to-end latency.
    6. Measure extra memory and scheduling overhead.
    7. Judge whether the gain is stable, not only the peak speed.

    7. Where speculative decoding does not help

    Speculative decoding is not a fit for every workload. If the draft and target models differ too much, candidates are rejected often. Strongly random tasks can also reduce agreement. If the real bottleneck is network transfer, request queuing, or context preprocessing, speeding up decode alone will not help much.

    Before adopting it, confirm that the bottleneck is token-by-token generation on the target model. For very long contexts, also look at attention compute, cache capacity, and memory bandwidth.

    In short, speculative decoding trades cheap prediction for more efficient batched verification on the target model. It does not weaken the model, and it is not simply “add more hardware.” It changes how generation is organized. When the draft model is fast enough, acceptance is high enough, and cache, scheduling, and communication costs stay under control, speed in a given setup can move from about 40 tokens/s toward 120 tokens/s. The real result still has to be measured on production data, end to end.