A Practical Guide to Speeding Up LLM Inference Under High Concurrency

    This article explains why LLM generation speed drops during traffic peaks and how to address it. It covers how compute and memory resources jointly determine throughput, what parameter-reusing deep inference architectures mean for serving, and why TTFT, TPOT, end-to-end throughput, and concurrency capacity must be defined separately. It then presents practical optimizations—continuous batching, KV cache management, quantization and operator fusion, elastic scaling, and observability—along with a four-step approach to model onboarding and governance.

    1. Background: Why Generation Slows Down at Peak Hours

    Once an LLM application reaches production, the first problem teams run into is usually not output quality but the fact that the service is usable during the day and turns into a slideshow during the evening peak. When a model vendor recently released a new flagship model, it published two sets of speed figures: generation could reach roughly 200 tokens per second off-peak, while still sustaining 70 to 80 tokens per second under peak traffic. This dual-figure disclosure highlights the core engineering tension in LLM serving—generation speed is not a fixed value but a function of load.

    Understanding this is the prerequisite for capacity planning. Generation speed is determined jointly by two kinds of resources: compute and GPU memory. Compute determines how long a single forward step takes, while GPU memory determines how many concurrent request contexts can be held at once. As concurrency rises during peak hours, the server increases batch size to improve overall utilization, which raises the per-step latency of each individual request, so the token output rate perceived on the user side drops. For this reason, any “peak speed” claim must come with a concurrency assumption; otherwise it has no engineering reference value.

    2. Deep Inference Architectures: Stronger Reasoning Without More Parameters

    The Loop Transformer mentioned in the source material belongs to the family of “parameter reuse plus deep iteration” approaches: with the parameter count unchanged, the same set of weights is invoked repeatedly multiple times, trading more compute steps for stronger reasoning and code generation. The industry typically implements this kind of method in a few ways:

    • Layer loop reuse: treat several layers as a block and execute it for multiple rounds, which is equivalent to deepening the network without adding parameters;
    • Hidden-state iterative refinement: apply multiple rounds of correction to intermediate representations, with each round taking the previous round’s output as input;
    • Adaptive computation: dynamically decide the number of iterations based on input difficulty, computing less for simple requests and more for complex ones.

    The engineering implication of these architectures is direct: GPU memory usage stays roughly unchanged, but compute demand multiplies. This means inference serving gradually shifts from being memory-bound to being compute-bound, and batching strategies, operator fusion, and parallelism partitioning all need to be retuned. The takeaway for adopters is not to estimate cost from parameter count alone, but to look at the actual compute cost per token.

    3. Throughput vs. Latency: Two Sets of Metrics That Must Be Defined Separately

    Many performance discussions reach contradictory conclusions because they mix different metrics together. It is worth standardizing the following definitions within a project:

    • Time to first token (TTFT): the time from request submission to receiving the first token, determined mainly by the prefill stage and queue wait time;
    • Time per output token (TPOT): the per-step latency of the generation stage, which determines how “fast” reading feels to the user;
    • End-to-end throughput (tokens/s): total system output per unit time, which determines unit cost;
    • Concurrency capacity: the number of requests that can be served stably while meeting latency constraints.

    A typical relationship is that increasing batch size raises total throughput and lowers unit cost, but pushes up both TPOT and TTFT. So a difference like “70 to 80 at peak, 200 off-peak” is not a product defect but an automatic tradeoff the scheduler makes between latency and throughput. A more robust engineering practice is to set differentiated SLOs for different workloads—for example, code completion scenarios should prioritize minimizing TTFT, while long-form generation scenarios should prioritize stable TPOT.

    4. Actionable Ways to Speed Things Up

    1. Request Scheduling and Batching

    Use continuous batching instead of static batching so new requests can be inserted in the gap between generation steps rather than waiting for a whole batch; schedule long and short requests in separate queues to prevent long contexts from blocking short interactions.

    1. # Pseudocode: core logic of continuous batching scheduling
    2. while engine.running:
    3. batch = scheduler.form_batch(max_tokens=MAX_BATCH, max_wait_ms=5)
    4. outputs = engine.step(batch) # one forward pass serves the whole batch
    5. for req, tok in zip(batch, outputs):
    6. streamer.emit(req.id, tok) # incremental return, lowers TTFT
    7. scheduler.recycle([r for r in batch if r.finished])

    2. KV Cache Management

    Use paged caching to reduce fragmentation, combined with prefix reuse, so common prefixes such as system prompts and code repository context are computed only once—a significant gain in multi-turn conversation and code completion scenarios.

    3. Quantization and Operator Optimization

    Apply low-bit quantization to weights and cache to reduce GPU memory bandwidth pressure within an acceptable accuracy range; apply operator fusion to repeated blocks inside loop structures to cut kernel launch overhead and reads/writes of intermediate tensors.

    4. Elastic Scaling and Multiple Queues

    Trigger scale-out based on queue length and TPOT metrics rather than CPU utilization; set up separate resource pools for interactive and offline batch workloads so offline jobs do not squeeze peak capacity.

    5. Full-Stack Observability

    Collect and alert on metrics such as TTFT, TPOT, queue wait time, cache hit rate, and batch size distribution—only then can you pinpoint whether the bottleneck is in queuing, prefill, or the decode stage.

    5. Model Onboarding and Governance Recommendations

    A new-generation model is typically first made available to subscription-based coding plan users, then gradually opened up through APIs and weights, while being integrated into various AI coding tools and development environments. For teams, it is advisable to break onboarding into four steps: first run a small-traffic canary internally to validate quality and speed; then build a unified gateway for routing, rate limiting, and fallback; next turn prompts, context assembly, and caching strategies into reusable components; finally complete a cost dashboard that accounts for per-token cost by business line.

    If a cloud-based approach is used, you can combine a container platform to host inference services, object storage to hold models and datasets, a message queue to smooth out traffic peaks and troughs, and logging plus monitoring and alerting for full-stack tracing, thereby keeping generation speed stable during peak hours. It is also worth watching call-volume trends: when a certain class of lightweight model climbs to the top of industry leaderboards, it signals that cost-sensitive scenarios are becoming mainstream, and capacity planning should reserve elastic headroom accordingly.

    6. Conclusion

    Generation speed is essentially the joint result of resources and scheduling. Understanding the compute cost introduced by deep inference architectures, separating latency from throughput metrics, and squeezing out utilization with continuous batching and cache reuse is the reliable path to handling peak congestion—rather than simply waiting for more hardware.