Eight-GPU LLM Inference Optimization: Parallelism Strategies and Throughput Improvement Practices

    This article explains how to optimize large language model inference on eight accelerators under real service-level objectives rather than chasing peak token throughput. Using a reference case that reorganized eight GPUs from 8-way tensor parallelism with a single data-parallel instance to 2-way tensor parallelism with 4-way data parallelism, it walks through defining effective throughput, splitting latency metrics, applying expert parallelism and sequence-dimension optimizations, and using graph capture and kernel compilation safely. The case reported up to a 53.5% throughput gain under a defined SLO, but the article emphasizes the reusable methodology: define service targets first, identify compute and communication bottlenecks, and validate every change with fair, repeatable, rollback-capable experiments.

    1. Optimization Goal: Not Raw Speed, but More Requests Completed on Time

    When deploying a large model, “the model runs correctly” and “the service carries production traffic reliably” are two different stages. The first concerns whether the model loads and produces correct results; the second must balance throughput, latency, resource usage, and stability at the same time.

    For interactive generation services, optimizing purely for tokens per second can be misleading. A system can raise device utilization by enlarging batches and lengthening queue waits, but users will see slower time-to-first-token and choppier generation. Inference optimization should therefore be constrained by service level objectives (SLOs), not by peak throughput measured without latency requirements.

    The reference case discussed here runs a quantized model on eight accelerators. The parallelism configuration was changed from “8-way tensor parallelism, 1-way data parallelism” to “2-way tensor parallelism, 4-way data parallelism,” combined with expert parallelism, sequence-dimension communication optimization, and graph/kernel compilation optimizations. The source material reports that, while meeting a defined SLO, the optimized configuration improved total throughput by up to 53.5%.

    This figure should be treated strictly as a case result under specific test conditions. Because the material does not provide the full input-length distribution, output-length distribution, latency thresholds, software versions, or repeated-test data, it cannot be read as a guaranteed gain for every eight-GPU deployment, nor can the contribution of each individual optimization be separated from it.

    What is genuinely reusable is the method: define the service target first, identify compute and communication bottlenecks, then validate changes through comparable, rollback-capable experiments.

    2. Define the Throughput Metric Before Claiming Gains

    2.1 Total Throughput and Effective Throughput Should Be Recorded Separately

    Total throughput usually means requests per unit time or tokens per unit time, but the two cannot be mixed. Requests with short outputs may yield high request throughput without high output-token throughput.

    For production services, you should also record effective throughput that satisfies the SLO. At request granularity, for example:

    Effective request throughput = number of successful requests meeting the defined criteria within the test window ÷ test duration

    The “defined criteria” must be written down in advance: whether time-to-first-token is limited, whether total completion time is limited, whether inter-token latency during generation is constrained, and how timeouts, failures, and cancellations are handled.

    Note carefully that “throughput counting only compliant requests” and “system throughput measured while overall latency metrics stay compliant” are different metrics. The former filters per request; the latter typically constrains overall latency percentiles. Both are legitimate, but the definition must be stated and must not be switched between the baseline and the optimized configuration.

    2.2 Latency Should Be Split into at Least Three Dimensions

    LLM generation has two main phases—input processing and step-by-step decoding—with corresponding key metrics:

    • Time to first token (TTFT): from request arrival to the first output token; affected by queueing, prefill, and scheduling.
    • Inter-token latency (ITL): the interval between adjacent output tokens during decoding; determines whether output feels smooth.
    • End-to-end latency: from request start to complete output; strongly influenced by output length.

    Averages alone are not enough. Under high concurrency, mean latency may change little while upper-percentile latency has already degraded sharply. For enterprise services, whether long-tail requests still meet the SLO often matters more than the highest throughput seen in a single run.

    3. Restructuring Eight-GPU Parallelism: From One Cooperative Group to Multiple Serving Groups

    3.1 8-Way Tensor Parallelism Solves Capacity but Adds Communication Overhead

    Tensor parallelism (TP) distributes part of a model’s computation and parameters across devices, which jointly execute each forward pass. Its key value is reducing per-device resource pressure so larger models can run.

    But scaling TP up does not scale throughput proportionally. Intermediate results must be exchanged, reduced, or synchronized across devices, and communication overhead depends on interconnect topology, data volume, and synchronization frequency. Under some workloads, eight GPUs may spend significant time waiting on each other, leaving compute underutilized.

    This is especially true in the token-by-token decoding phase, where each step’s compute is relatively small and communication and scheduling overhead become harder to ignore. “Using all eight GPUs to serve one model instance cooperatively” is therefore not automatically the best organization for high-concurrency serving.

    3.2 The Core of 2-Way TP + 4-Way DP Is Shrinking the Cooperation Scope

    Splitting eight GPUs into four serving groups, each using 2-way tensor parallelism, lets different groups handle different requests. In inference, data parallelism’s value is expanding the capacity to process independent requests—not speeding up the computation of any single request.

    This configuration can yield two kinds of benefit:

    1. A smaller TP scope within each group reduces some cross-device communication and synchronization pressure.
    2. Multiple groups run batching and scheduling independently, improving overall resource utilization when concurrency is sufficient.

    However, the gains have clear prerequisites. The model must run correctly under the new parameter placement and execution scheme, and each group must have enough headroom for the KV cache, temporary tensors, and runtime overhead. If a 2-GPU group is too tight on memory, you may be forced to shrink batch sizes, canceling the benefit of restructuring.

    In addition, the four groups can become load-imbalanced. If long requests concentrate on one group, its queue grows while others sit idle. Data-parallel configurations must therefore be validated together with request routing, queue management, and load balancing.

    3.3 Expert Parallelism Is Not Just Another Independent Multiplier

    For Mixture-of-Experts (MoE) models, different experts can be placed on different devices, and tokens are routed to the appropriate experts for processing. That is the basic idea of expert parallelism (EP).

    EP helps distribute expert parameters and compute load, but it also introduces token dispatch, result aggregation, and load-balancing problems. When a few experts are selected disproportionately often, hotspot devices can slow the entire execution.

    Therefore, TP, DP, and EP should not be judged by name or by the size of their numbers. Experts may be distributed across certain device groups, and expert and non-expert parts of the model may use different parameter placements. Whether actual independent model replicas exist depends on the concrete execution architecture—not on simply multiplying all parallelism dimensions together.

    4. Communication and Compilation Optimizations: Gains Come from Less Waiting, but Boundaries Must Be Verified

    4.1 Sequence-Dimension Splitting Should Target Real Hotspots

    Sequence parallelism typically partitions some intermediate computation or activations along the sequence dimension, reducing per-device burden and offering different options for organizing communication. Its relationship with tensor parallelism depends on the implementation; it should not be loosely understood as “turn it on and all communication shrinks.”

    When evaluating it, focus on:

    • Which computations are split;
    • Which intermediate results must be re-aggregated;
    • Whether communication volume actually changes;
    • Whether the benefit holds as input length varies;
    • Whether new synchronization points hurt tail latency.

    Extra splitting and reorganization is only worthwhile if it relieves a real bottleneck.

    4.2 Graph Execution Reduces Repeated Scheduling Overhead

    Inference involves large amounts of repeatedly executed computation. Graph capture and replay can, where applicable, reduce per-step scheduling overhead and make the execution path more stable.

    But real serving traffic is dynamic in input length, batch size, and cache state, so you cannot assume every request fits a single captured graph. A common practice is to bucket inputs or batch sizes, build execution paths for a set of typical shapes, and keep a fallback path for requests that do not fit.

    This also requires balancing warmup time, graph cache footprint, and request coverage. If fitting fixed shapes requires heavy padding, the scheduling overhead you save may be consumed by the extra compute.

    4.3 Kernel Compilation Requires Attention to First-Run Cost

    Compiling kernels for specific shapes or data types can improve operator execution and reduce intermediate memory access. But compilation and warmup can lengthen startup, and poorly managed caches can affect service stability.

    Tests should therefore record cold-start behavior and steady-state behavior separately. Warming up the typical execution paths before going live is safer than triggering compilation when production requests arrive.

    These optimizations also interact with each other. A parallelism change alters compute shapes and communication patterns, so a previously effective compilation configuration may stop being effective. The gains of multiple optimizations cannot simply be added together.

    5. Building a Fair Benchmark: Making Results Explainable

    5.1 Fix the Baseline Conditions

    Baseline and optimized configurations should keep the following as consistent as possible:

    • Model weights, quantization scheme, and precision requirements;
    • Number of accelerators, interconnect topology, and host environment;
    • Inference software versions and runtime environment;
    • Input and output length distributions;
    • Request arrival pattern and test duration;
    • SLOs, timeout rules, and statistical methods.

    Quantization can reduce model footprint, but different quantization settings affect both accuracy and operator execution. If two test groups change quantization at the same time, the gains cannot be attributed entirely to parallelism adjustments.

    5.2 Ramp Load Gradually to Find the Compliant Capacity Boundary

    Start from low load and increase request rate or concurrency step by step, recording throughput, latency percentiles, error rate, and resource usage at each load point.

    Fixed-concurrency tests are good for observing sustained behavior, but clients naturally slow down sending while waiting for responses, which can mask server overload. Fixed-arrival-rate tests make it easier to see whether queues keep growing, but they need sensible timeouts and stop conditions.

    The two approaches complement each other; the key is to state the load-generation mechanism explicitly.

    5.3 Run Stepwise Experiments Instead of Stacking All Configurations at Once

    A recommended validation order:

    1. Establish a reproducible baseline configuration;
    2. Adjust the TP/DP organization;
    3. Validate expert placement and its communication impact;
    4. Introduce sequence-dimension optimizations;
    5. Validate graph capture and kernel compilation;
    6. Finally, test the combined configuration.

    Keep results at every step, covering at least throughput, latency, resource usage, and correctness checks. Run multiple repeated rounds to avoid mistaking short-term fluctuation for a stable gain.

    The throughput improvement ratio can be computed with a uniform formula:

    Improvement ratio = (optimized throughput ÷ baseline throughput − 1) × 100%

    But a report should not show only the best improvement point. The complete load curve and degradation scenarios are what tell you which workloads a configuration actually suits.

    6. Turning the Optimized Configuration into a Reusable Deployment Plan

    A valuable deployment practice is not an isolated set of parameters, but a configuration document that includes applicable conditions, test evidence, and a rollback path.

    Each plan should record at least: model resource requirements, quantization conditions, runtime environment, parallelism organization, cache budget, batching strategy, and the benchmark workload. For MoE models, it should also describe how expert placement relates to device groups.

    The cache budget deserves special emphasis. Even if the weights fit on the devices, long contexts and high concurrency can still exhaust attention (KV) cache space. Production capacity planning must reserve headroom for temporary tensors, runtime memory, and abnormal spikes—request capacity cannot be estimated from weight size alone.

    For rollout, start with a small portion of traffic and continuously monitor TTFT, generation speed, error rate, and resource usage. If the new configuration shows tail-latency degradation, resource exhaustion, or execution fallbacks, you should be able to revert quickly to the validated baseline.

    Reusing a configuration does not mean copying it blindly. When device topology, input distribution, or business peaks change, retest. A plan tuned for short inputs and high concurrency may not fit long-context, low-concurrency workloads.

    7. Conclusion: Optimization Is About Matching the Workload, Not Adding Switches

    Eight-GPU inference performance emerges from the interaction of model architecture, resource capacity, communication topology, request distribution, and scheduling. Replacing a large tensor-parallel group with smaller cooperating groups plus concurrency-oriented data parallelism is a direction worth validating; expert parallelism, sequence parallelism, and compilation optimizations should be chosen around actual bottlenecks.

    The reference case’s maximum 53.5% throughput improvement shows that parallelism organization and execution optimizations can deliver significant gains, but it is not a performance promise that transfers directly.

    For developers and enterprise teams, the more reliable path is: unify metric definitions first, build a fair baseline, then experiment step by step, and finally consolidate the configuration, evidence, and rollback procedure together. The result is not a one-time impressive benchmark number, but an inference engineering methodology that supports stable service and continuous iteration.