LLM Inference Throughput Optimization on 8 GPUs: A Practical Guide for Domestic AI Accelerators

    This article presents a vendor-neutral methodology for improving inference throughput on an 8-GPU node running quantized large models on a domestic AI accelerator with a mainstream open-source inference engine. It covers building a trustworthy baseline, comparing pure tensor parallelism with hybrid tensor and data parallelism, applying sequence and expert parallelism, enabling graph capture and kernel autotuning, and budgeting memory for quantization and KV cache. Readers will learn a reproducible order of optimization steps and common pitfalls to avoid when validating results against a fixed SLO.

    1. Why Throughput Tuning on an 8-GPU Node Deserves Its Own Discussion

    When deploying large generative models on domestic compute platforms, the hardest question is rarely “does it run?” It is “can it hold up under concurrency once it runs?” An 8-GPU server is a common resource unit in these environments: it is large enough to host a quantized mid-sized model, yet it avoids the extra networking and scheduling complexity of multi-node deployments. How fully you can saturate compute, inter-GPU communication, and memory bandwidth inside that single box therefore determines both service capacity per unit of hardware and cost efficiency.

    The core tension is that as concurrent requests increase, per-GPU compute utilization, inter-GPU communication overhead, memory footprint, and queueing delay all shift at the same time. If any one of them becomes the bottleneck, the throughput curve flattens earlier than expected. Using a domestic accelerator card in an 8-GPU configuration with a quantized model served by a mainstream open-source inference engine as the example, this article abstracts a tuning methodology that is independent of any specific product.

    2. Establish a Trustworthy Baseline First: Tuning Without One Is Guesswork

    The first step is not parameter tweaking but making results comparable. Fix at least the following variables:

    • The same model and quantization format, with no mid-stream change to weight source or precision mode;
    • The same engine version, image version, driver, and runtime version;
    • The same input and output length distribution, for example fixed quantiles for prompt length and generation length;
    • The same SLO definition, with explicit upper bounds on time to first token and end-to-end latency;
    • The same load-testing method, applying a fixed concurrency gradient and recording the throughput-latency curve.

    Only when these conditions hold is the delta between baseline and optimized build meaningful. A frequent mistake is relaxing the latency constraint after tuning, so the apparent “throughput gain” actually comes from lower service quality. Such conclusions cannot be reproduced and cannot be used for capacity planning.

    3. Parallelism Strategy: From Pure Tensor Parallelism to a Hybrid of Tensor and Data Parallelism

    3.1 Limits of Pure Tensor Parallelism

    The most intuitive configuration on 8 GPUs is tensor parallel size 8 with data parallel size 1. It splits memory most thoroughly and keeps single-request latency low. The drawback is equally clear: every layer’s forward pass requires a cross-GPU reduction, so the number of collective operations scales with the number of layers and inter-GPU synchronization is frequent, amplifying the communication share of the hardware. As concurrency grows, communication cost does not amortize in step with compute, so the throughput curve saturates early.

    3.2 Where the Hybrid Gain Comes From

    Switching to tensor parallel size 2 and data parallel size 4 effectively splits the 8 GPUs into four independent inference replicas, each doing only a small tensor split internally. The gains come from three sources. First, the number of participants in each cross-GPU reduction drops from eight to two, cutting both the data volume per collective and the synchronization wait. Second, requests spread across four replicas, so batch scheduling is fuller and idle bubbles in the compute units shrink. Third, replica-level isolation keeps a single long-tail request from slowing down the whole group of cards.

    This is not a universal optimum. It holds only if the quantized model still fits its weights plus enough KV cache under tensor parallel size 2. For a larger model or a longer context, you must fall back to a higher tensor parallel size or bring in expert parallelism to share the memory pressure.

    3.3 Where Expert Parallelism Fits

    For models with a sparse expert structure, expert parallelism places different experts on different GPUs, lowering per-GPU memory use while raising the parallelism of expert computation. How it combines with tensor and data parallelism is part of the design space and must be evaluated against the model’s expert count and activation routing distribution, so that uneven routing does not overload individual cards.

    4. Communication and Sequence Parallelism: Trading Redundant Compute for Less Data Movement

    Sequence parallelism is a common approach for long sequences: the sequence dimension is split across the GPUs in a group, so fragments that were previously recomputed on every card are shared, with communication filling in the required global information. Its value is lower per-GPU activation memory and less duplicated computation; its cost is extra communication steps. Whether it pays off depends on the ratio among sequence length, hidden dimension, and inter-GPU interconnect bandwidth: the longer the sequence and the more abundant the bandwidth, the clearer the benefit.

    In practice, evaluate sequence parallelism together with the hybrid configuration rather than enabling it alone. Changing the parallel degrees changes the communication topology and the location of synchronization points, so conclusions drawn from tuning one knob in isolation often do not transfer.

    An illustrative configuration snippet (expressing parameter relationships only, not a specific product interface):

    1. parallel:
    2. tensor_parallel_size: 2 # intra-group tensor split
    3. data_parallel_size: 4 # number of replicas serving concurrency
    4. expert_parallel: enabled # sparse experts distributed across GPUs
    5. sequence_parallel: enabled # long-sequence split to cut redundant compute
    6. runtime:
    7. graph_mode: enabled # static graph capture to reduce scheduling overhead
    8. kernel_autotune: enabled # automatic kernel tuning
    9. slo:
    10. first_token_latency_ms: 800
    11. end_to_end_latency_ms: 4000

    5. Graph and Kernel Compilation: The Easily Missed Second Tier of Gains

    Beyond the parallelism strategy, how the runtime executes also affects throughput. Dynamic per-operator dispatch adds substantial launch and synchronization overhead, and that share is higher during decoding, where each step does little computation but the loop runs many times. With static graph capture enabled, the whole computation is organized into a reusable execution graph, dispatch count drops, and the host side becomes less likely to be the bottleneck.

    Automatic kernel tuning then selects better implementations and tiling strategies for specific shapes. Because inference workloads tend to cluster around a narrow distribution of input and output lengths, tuning results can be cached and reused for a long time. Note that graph mode is sensitive to dynamic shapes: if request lengths fluctuate widely, evaluate bucketing or fixed-shape strategies to avoid frequent fallback to dynamic execution, which would cancel out the gains.

    6. Quantization and Memory Budget: The Invisible Ceiling on Throughput

    The contribution of quantization to throughput is often underestimated. Lowering weight bit width reduces not only memory footprint but also memory traffic, and decoding is typically memory-bound. The memory budget must cover weights, KV cache, and runtime buffers at once, with the KV cache growing linearly with concurrency and context length. A practical approach is to work backward from the target concurrency to the KV cache requirement, then choose the tensor parallel size and quantization scheme, rather than fixing the parallel size first and seeing how much concurrency fits afterward.

    7. Validation Method and Common Pitfalls

    Proceed in the following order, keeping reproducible records at every step:

    1. Fix the model, engine, and load-test methodology, and produce a baseline throughput-latency curve;
    2. Adjust the parallelism strategy and check whether the throughput inflection point moves right;
    3. Add sequence parallelism and compare the benefit across different sequence lengths;
    4. Enable graph mode and kernel tuning, watching single-step decode time;
    5. Take the maximum sustainable concurrency under the defined SLO and convert it to per-GPU throughput.

    Common pitfalls include looking only at peak throughput while ignoring the latency constraint; testing a single input length; mixing conclusions from different engine versions; ignoring inflated numbers caused by warm-up and cache hits; and evaluating optimizations at low concurrency, where communication and scheduling gains cannot show up.

    8. Summary

    Inference throughput tuning on an 8-GPU node is essentially a reallocation of budget among compute, communication, and memory. The parallelism strategy determines the communication topology; sequence and expert parallelism reshape the compute and memory distribution; graph and kernel compilation compress runtime overhead; quantization raises the memory ceiling. Combining these levers in the order of baseline first, then parallelism, then runtime, and validating under a single consistent SLO definition, is what yields throughput gains that are reproducible and transferable under real business load.