Trade-offs in LLM Inference Acceleration: Speed, Latency, and Output Quality

    This article examines the practical trade-offs of speculative decoding, using Multi-Token Prediction (MTP) as an example and drawing on single-machine inference measurements. It explains why throughput gains in single-request scenarios can reverse under concurrency, how draft depth affects acceptance and wasted computation, and why time to first token (TTFT) matters for long-prompt, short-response workloads. It also outlines a validation approach for selecting configurations based on speed, latency, and memory rather than a single metric.

    1. Problem Background

    Users of inference services typically care about two things: how quickly an answer starts and whether the generation process is smooth. Teams also need to confirm whether acceleration affects the reliability of model output. Many discussions conflate these concerns and arrive at a simple conclusion: enabling a certain optimization makes everything faster. The actual situation is more complex. Using a set of single-machine inference measurements as a thread, this article discusses the applicable boundaries of speculative decoding techniques such as Multi-Token Prediction (MTP) and explains how to validate quality when selecting a configuration.

    One point needs to be clarified first: the measurements mainly include speed and memory data, not comparisons of hallucination rate or factual accuracy. Therefore, this article does not directly judge which configuration produces less hallucination. Instead, it provides a method that can be used to verify this independently.

    2. Basic Concepts

    Autoregressive decoding generates only one token per step. Each token requires a complete model forward computation, so when generating long responses, speed is mainly limited by per-step computation and memory bandwidth.

    The idea behind speculative decoding is to use a lower-cost draft mechanism to guess several candidate tokens at once, and then have the main model verify them in parallel. Tokens that pass verification are accepted directly, while rejected tokens are discarded, and generation continues from the rejection position. The process is shown below:

    1. Loop:
    2. 1. The draft mechanism predicts k candidate tokens based on the current context.
    3. 2. The main model performs one forward pass and scores all k positions in parallel.
    4. 3. Compare from left to right; tokens that match the main model's most likely output are accepted.
    5. 4. At the first mismatch, truncate and switch to the token produced by the main model.
    6. 5. Append accepted tokens to the context and proceed to the next round.

    This process has two key quantities: acceptance rate and guess depth. When the acceptance rate is high, each verification step yields more valid tokens, and the speed benefit is clear. When the acceptance rate is low, the overhead of drafting and verification offsets the gain. Guess depth determines how many candidates are attempted in each round. A greater depth raises the theoretical upper bound of the benefit, but also wastes more computation when candidates are rejected.

    Under standard acceptance criteria, the output distribution is theoretically consistent with the original model. This means speculative decoding changes generation speed, not model weights or capabilities. Operations that change weights, such as quantization and fine-tuning, are fundamentally different, and their quality impacts need to be evaluated separately.

    3. Differences Between Single-Request and Concurrent Scenarios

    In single-request scenarios, enabling MTP generally improves decoding speed. The following table shows a set of single-machine measurements with context lengths ranging from 1K to 64K. Decode speed is measured in tokens/s:

    Context length MTP disabled MTP enabled Decode improvement
    1K 32.2 35.0 +8.7%
    4K 26.1 34.7 +33.0%
    16K 20.3 24.5 +20.7%
    64K 20.0 25.4 +27.0%

    The improvement is most obvious at 4K. The variation across context lengths shows that draft acceptance rate changes with input content and cannot be summarized by a single number for all scenarios.

    The conclusion for concurrent scenarios is the opposite. In the same set of tests, when concurrency was 2, aggregate throughput with MTP enabled was 57.4 tokens/s, compared with 71.9 tokens/s for the baseline. When concurrency was 4, the figures were 92.1 and 103.3 tokens/s, respectively.

    Concurrency MTP disabled (aggregate) MTP enabled (aggregate) Change
    1 32.2 35.0 +8.7%
    2 71.9 57.4 -20.2%
    4 103.3 92.1 -10.8%

    As concurrency increases, batching can already make full use of computational resources. The extra computation introduced by drafting and verification competes with other requests for resources, and aggregate throughput declines accordingly. Therefore, reducing per-user waiting time and increasing total multi-user throughput are two different optimization goals. Service architectures can separate the two types of traffic: enable speculative decoding on low-concurrency interactive instances, and keep conventional decoding on high-concurrency batch paths.

    4. Choosing Decode Depth

    The optimal depth depends on how predictable the content is. Natural-language prose offers many word choices, so draft guesses are more likely to be rejected, and a shallow chain (depth 1) is usually more stable. Templated code, repeated structures, and fixed-format output are highly predictable, so deeper guess chains have a better chance of providing gains.

    In the tests, using depth 1 as the default performed better than adaptive depth 3. The reason is that deep chains have a higher failure cost. Guessing more tokens may reduce the number of decoding steps for the main model, but it may also increase drafting and verification overhead when tokens are rejected.

    For mixed workloads, a fixed shallow chain can be used as a starting point, followed by validation for each business scenario. The validation process can be written as the following pseudocode:

    1. for depth in [1, 2, 3]:
    2. for workload in [prose generation, code completion, structured output]:
    3. record decode speed, TTFT, acceptance rate, peak memory
    4. compare composite scores on the target workload and select the best depth

    The composite score should consider speed, latency, and memory together, rather than relying on a single metric.

    5. Time to First Token Cannot Be Ignored

    In scenarios involving long prompts and short responses, time to first token (TTFT) often has a greater impact on total elapsed time than decoding speed.