# LLM Inference Speed: Why It Became the New Competitive Battleground
As foundation models converge on general-purpose capability, inference speed has become a distinct product-level advantage. This article explains how to measure it correctly, why the same model weights can be ten or more times faster with a different serving stack, and which techniques — quantization, paged KV cache, continuous batching, speculative decoding, and parallelism — actually move the needle. It also introduces the "speed frontier" as a way to reason about the trade-off between model size, throughput, quality, and cost, and closes with a practical four-step playbook for choosing and tuning a deployment for your workload.
1. The Focus Shifts: From “Can It?” to “Is It Fast?”
For the past two or three years, the dominant narrative in the LLM industry has been a capability contest: leaderboard scores, reasoning benchmarks, and success rates on hard tasks have filled nearly every launch announcement. But as leading models converge on general tasks, a question that maps far more closely to real-world experience has come to the fore: are users willing to wait?
For code completion, real-time chat, voice interaction, and agentic tool calling, output speed directly determines whether a product is usable at all. A model that emits a few dozen tokens per second and one that sustains more than a thousand tokens per second can have similar “intelligence” yet deliver entirely different product experiences. Inference speed is therefore moving from a low-level performance metric to an independent product capability — the new focus as LLM competition enters its second half.
Speed does not exist in isolation. It is tied to cost (faster usually means more efficient use of compute), to experience (time to first token and the smoothness of streaming output), and to scale (how many concurrent users a unit of hardware can serve). Understanding the engineering behind it is therefore practical for both developers and enterprise buyers.
2. Measuring Output Speed: Three Metrics That Must Stay Separate
Much discussion conflates “speed” into a single number. In practice there are at least three distinct dimensions, and blurring them easily leads to wrong conclusions.
- Time To First Token (TTFT): the time from sending a request to receiving the first token. It corresponds mainly to the prefill phase (parallel computation over the input prompt) and determines “how long after I hit enter does text start appearing.” For interactive use cases this is the most important experience metric.
- Time Per Output Token (TPOT) / Inter-Token Latency (ITL): the average time to produce each subsequent token during generation, corresponding to the decode phase (autoregressive generation token by token). It determines whether the output “flows” or stutters.
- Throughput: the total number of tokens the system generates per unit of time across all concurrent requests, typically expressed in tokens/s. It measures how much work “one machine or one cluster” can absorb overall, and maps directly to unit cost.
A common mistake is using single-request streaming speed as a proxy for system throughput — or, in reverse, quoting peak throughput as a promise about individual user experience. The two are often in tension: increasing batch size to raise aggregate throughput can lengthen the inter-token latency of any single request. When evaluating speed, be explicit about whether you care about per-user experience or overall production capacity.
3. Same Model, Ten Times Faster: Why the Serving Stack Matters
One finding keeps being reproduced: with identical model weights, changing how you serve the model can change speed by more than 10x.
An unoptimized, default inference deployment is usually the most conservative configuration: small batches, naive caching, generic operators, no quantization. Solutions at the speed frontier, by contrast, have squeezed every stage of the system. The differences trace back to roughly four areas:
- Numerical precision and GPU memory: whether quantization is applied and how the KV cache is stored;
- Scheduling: how requests are batched and queued;
- Hardware and parallelism: which accelerators are used and how tensors are partitioned across them;
- Compute kernels: whether operators are fused and tuned for the target hardware.
This explains a counterintuitive conclusion: without changing the model at all, optimizing the inference stack alone can yield order-of-magnitude speedups. For most teams this is the highest-return step available.
4. The Key Techniques Behind Fast Inference
1. Quantization
Compressing weights and/or activations from high precision (e.g. FP16) to lower precision (e.g. INT8, INT4, FP8) substantially reduces memory footprint and improves effective bandwidth utilization, which accelerates the decode phase — that phase is often limited by memory bandwidth rather than compute. The cost is a potential small loss in accuracy, which is controlled through calibration, mixed precision, or quantization-aware training.
2. KV Cache Management and Memory Optimization
Autoregressive generation requires caching the keys and values of prior tokens, and under long contexts the KV cache alone can consume enormous amounts of GPU memory. The industry widely adopts a paged KV cache management approach: split the cache into fixed-size blocks allocated on demand, reducing fragmentation and improving memory utilization so that larger batches and longer contexts become feasible. Architectures such as Grouped-Query Attention (GQA) and Multi-Query Attention (MQA) let multiple query heads share the same KV, shrinking the cache further.
3. Continuous (In-Flight) Batching
Traditional static batching cannot release resources until every request in the batch finishes, so short requests get held back by long ones. Continuous batching lets completed requests leave and new ones join while generation is still in progress, keeping the GPU at high utilization. It is one of the key scheduling techniques for improving throughput and average latency at the same time.
4. Speculative Decoding
A smaller, faster “draft” model proposes several tokens, and the large model validates them in a single parallel pass. Correctly predicted tokens are accepted; incorrect ones fall back to the point of divergence. Because validation is parallel, speculative decoding can markedly improve single-stream streaming speed without changing the output distribution, provided the draft hit rate is high enough.
5. Parallelism
- Tensor parallelism: partitions the large matrices inside a single layer across multiple GPUs for collaborative computation. Useful when one layer does not fit on a single device, at the cost of additional communication overhead.
- Pipeline parallelism: splits the model by layer and runs stages in a pipeline to raise utilization.
- Expert parallelism: designed for Mixture-of-Experts (MoE) architectures, distributing different experts across different devices.
The reason MoE models can have a very large total parameter count while keeping the number of parameters activated per token relatively manageable is precisely the combination of this kind of parallelism with sparse activation — and it is a key engineering foundation for being “big without being slow.”
6. Kernel and Operator Optimization
Fusing multiple small operators (for example, collapsing several attention-related steps into a single kernel), tuning for a specific hardware instruction set, and using efficient attention kernels all reduce memory traffic and kernel launch overhead. This work looks low-level, but it is often the final step that determines whether a system can reach the speed frontier at all.
5. Balancing Speed and Scale: Understanding the “Speed Frontier”
Plot total parameter count on the horizontal axis and the highest achievable output speed on the vertical axis, then connect the best observed speed for each sample. The result is a speed frontier, and it reveals a simple rule:
- Overall, larger models are harder to make fast on a single stream — the additional compute and memory cost is real.
- But the position of the frontier is not fixed. It depends on the level of engineering effort. Given the same model size, whoever optimizes quantization, caching, scheduling, and kernels more thoroughly can push their own point further forward.
The speed frontier is therefore essentially a Pareto frontier: it describes the upper bound on speed that engineering can reach for a given model size. When choosing a point, enterprises should ask two questions: does the business actually need the largest model? And if it does, has the current serving stack already approached this frontier? Very often, “a smaller model with aggressive optimization” beats “the largest model with default settings” on speed, cost, and user experience.
6. Putting It Into Practice: Choosing the Right Deployment
Talking about speed detached from the business is empty. A practical path looks like this:
Step 1: Define your speed target. Is TTFT the priority (interactive products), smoothness of streaming (reading-oriented), or throughput (batch and offline)? Each target shifts the tuning focus somewhere different.
Step 2: Run a trustworthy benchmark instead of trusting marketing numbers. The snippet below is illustrative and measures the key single-stream generation metrics (adapt it to the actual inference service you use):
import timedef measure_generation_speed(llm_client, prompt, max_tokens=256):start = time.perf_counter()first_token_time = Nonetokens = 0for chunk in llm_client.stream(prompt, max_tokens=max_tokens):if first_token_time is None:first_token_time = time.perf_counter()tokens += chunk.token_countend = time.perf_counter()ttft = first_token_time - start # Time to first tokengen_time = end - first_token_time # Pure generation timetpot = gen_time / max(tokens - 1, 1) # Inter-token latencytps = tokens / (end - start) # Average single-stream speedreturn {"ttft_seconds": round(ttft, 4),"tpot_seconds": round(tpot, 4),"tokens_per_second": round(tps, 1),}
One caution when benchmarking: concurrency must reflect real traffic. A single-stream test yields the prettiest number, but the experience real users get depends on behavior under load. Sweep across concurrency levels, plot a latency–throughput curve, and find the knee that holds up under peak traffic without sacrificing experience.
Step 3: Tune for the actual bottleneck. Depending on what step 2 reveals, that means introducing quantization, adjusting the batching strategy, optimizing the KV cache, or moving to a different parallelism scheme. Keep a reproducible evaluation baseline, and change one variable at a time to avoid tuning yourself into confusion.
Step 4: Reduce operational load with managed services. For most enterprise teams, building and maintaining an aggressively optimized inference stack over the long term is expensive. Mature general-purpose cloud capabilities can absorb that burden: container platforms for elastic scaling and rolling releases, object storage for model weights and data, and log services plus monitoring and alerting to track TTFT, TPOT, throughput, and error rates continuously. General-purpose cloud infrastructure from providers such as Baidu AI Cloud lets teams focus on their product and on model quality instead of rebuilding the same plumbing.
7. Conclusion
As LLM competition enters its second half, speed has moved from a backend metric to a core competitive advantage written into the product experience. Understanding the difference between TTFT, TPOT, and throughput, understanding why the same model can differ by an order of magnitude depending on how it is deployed, and mastering the toolbox of quantization, caching, batching, speculative decoding, and parallelism is what lets developers make rational trade-offs within the triangle of speed, quality, and cost.
One point is worth remembering above all: the ceiling on capability is set by the model, but the floor on experience is set by engineering. Whoever refines the inference stack more thoroughly is more likely to gain the early advantage on the speed frontier.
