How LLM Inference Gets Faster: From Serial Generation to Parallel Verification
Why is large language model inference slow? The answer lies in autoregressive decoding's serial bottleneck. This article explains the core techniques that unlock major speedups on commodity GPUs: speculative decoding with block-level parallel verification, layer-aware quantization for MoE architectures, and system-level optimizations that eliminate scheduling overhead—and how combining them achieves token-per-second throughput at the thousand level on a single 8-GPU node.
1. Autoregressive Decoding: The Core Bottleneck
Text generation in large language models is fundamentally a serial decoding process: the model produces one token per step, and each step’s output must feed into the next. This strong sequential dependency shows up in deep learning frameworks as a series of forward passes that cannot be parallelized.
Consider a typical GPU node with thousands of compute cores and enormous floating-point throughput. Under token-by-token generation, each forward pass activates only a small fraction of the hardware. The matrix multiplications themselves execute extremely fast, but once they finish, the GPU must sit idle waiting for the current result to be finalized and fed back before the next round of computation can begin. The result: low per-step latency, but severely constrained overall throughput.
This inefficiency only grows with model scale. As parameter counts increase, the compute per forward pass grows, but the number of serial steps does not shrink. In other words, the larger the model, the higher the proportion of idle compute. This is precisely why the industry has long pursued approaches that “generate multiple tokens in a single step.”
2. Breaking the Serial Constraint: The Evolution of Speculative Decoding
To escape autoregression’s serial constraint, the intuitive idea is to make the model predict multiple outputs at once. Early multi-token prediction schemes typically relied on auxiliary modules—for example, training a lightweight draft model to quickly generate candidate tokens, which the main model then verifies in a single pass. This “draft-then-verify” paradigm can effectively improve per-step throughput, but it introduces new problems: the cost of training the draft model, the difficulty of aligning its distribution with the main model, and extra memory overhead at inference time.
Beyond the draft-model approach, another route abandons auxiliary networks entirely and instead exploits the model’s own structure for parallel prediction. The key insight is that in a Transformer’s attention mechanism, the query vectors at different positions are naturally independent of one another. Given the existing context, the model can compute prediction distributions for multiple positions simultaneously, without waiting for intermediate results step by step. Based on this property, an inference framework can generate several candidate tokens in a single forward pass and use a block-level masking mechanism to verify their correctness at the same time.
This block-level parallel verification approach has proven especially effective in production deployments. Compared with token-by-token verification, block-level verification feeds multiple candidate tokens into the model as a group and checks, in a single forward pass, whether predictions at all positions match the actual values. Empirical results show that with a high acceptance rate, each round of verification can confirm 6 to 7 tokens on average—compressing what would have required 7 serial decoding steps into one parallel computation plus one verification loop, and dramatically reducing the total number of decoding steps.
3. Lossless Model Slimming: Quantization Co-Designed with Architecture
Once the number of decoding steps is reduced, optimizing the efficiency of each step becomes the next lever. Low-precision quantization is widely used to shrink model size and accelerate matrix operations. But generic 4-bit quantization often comes with accuracy loss, and in scenarios where activation distributions vary widely, quantization error can be amplified layer by layer.
For Mixture-of-Experts (MoE) architectures, a more fine-grained strategy has proven effective: quantize only the expert layers—which account for the vast majority of parameters—to low precision, while keeping the attention and routing layers at their original precision. The rationale is that in MoE models, expert layers have high parameter redundancy and relatively concentrated weight distributions, making them well suited to low-bit representation, whereas attention layers are sensitive to numerical precision—tiny errors there can shift the semantic distribution of the output.
This “per-layer” quantization strategy delivers two direct benefits. First, memory footprint drops significantly, leaving more headroom for the KV cache and inference computation. Second, low-precision matrix multiplication has a higher throughput ceiling on general-purpose GPUs, substantially increasing floating-point operations per unit of time. With this approach, accuracy loss on specific tasks can be kept extremely low, achieving both engineering efficiency and model quality.
4. System-Level Scheduling: Eliminating Every Wait
Beyond hardware and algorithmic optimizations, the execution efficiency of the inference system itself is critical. In real deployments, frequent context switches and kernel launch overhead when the GPU executes operators are often hidden performance killers. During parallel candidate verification in particular, if many small operators cannot be orchestrated quickly, the time saved by earlier optimizations is simply wasted on system scheduling.
The mainstream industry response is to restructure execution through computation graph optimization and operator fusion. Concrete practices include: fusing consecutive matrix multiplications, normalization, and residual connections into single kernels; batching and prefetching KV cache reads and writes; and using CUDA Graphs to capture and fix the entire GPU operation sequence of the decoding stage, eliminating per-iteration kernel launch overhead.
With these system-level optimizations in place, GPU streaming multiprocessor utilization can stay extremely high—even approaching theoretical peak. This means that optimizations at every layer, from algorithm design to system deployment, are effectively translated into real token generation speed.
5. Combined Gains and Deployment Lessons: A Performance Leap on Commodity Hardware
Stacking the three key optimizations—precision-aware model compression via quantization, step reduction through block-level parallel speculative decoding, and latency elimination at the scheduling layer—produces striking results. On a standard 8-GPU node with commodity hardware, a single node can achieve generation speeds on the order of thousands of tokens per second, without any custom silicon.
This offers valuable lessons for inference service providers. It shows that improving inference performance does not depend solely on more advanced hardware: through co-design across the algorithm, model, and system layers, order-of-magnitude gains are achievable on general-purpose GPU clusters. For foundation model API services, this means higher concurrent request capacity and lower streaming response latency under the same compute budget, significantly reducing the operational cost per token.
From an industry practice perspective, this path also provides a clear template for large-scale model deployment: first, identify the parts of the model architecture that can be compressed without loss; second, break autoregression’s serial constraint with parallel decoding strategies; and finally, rely on system-level optimization to convert theoretical speedups into real throughput gains. These three pieces are tightly interlocked, and none can be missing. Looking ahead, as speculative decoding acceptance rates improve further and hardware adds native support for low-precision computation, inference speeds of thousands—or even tens of thousands—of tokens per second will become baseline infrastructure for LLM services rather than a cutting-edge differentiator.
