8-Accelerator LLM Inference: Tuning Parallelism Strategies to Improve Throughput
This article explains how to tune parallelism on an 8-accelerator LLM inference setup. It covers tensor, data, and expert parallelism, how to define throughput under latency SLOs, when to combine parallelism strategies, communication-computation overlap, sequence parallelism, graph compilation, how to read a published optimization case, and a reusable benchmarking workflow.
1. Background: Why Multi-Accelerator Inference Needs Dedicated Tuning
Once a model is selected, deployment efficiency and final performance still depend on three factors: how the accelerators are partitioned, how parallelism methods are combined, and how communication and computation are coordinated at the lower level. On a single accelerator or a small cluster, default configurations usually run without problems. At an 8-accelerator scale, however, inter-device communication overhead, memory usage, and request scheduling affect one another. The same hardware can deliver very different throughput depending on the parallelism scheme.
Tuning therefore does not aim only at peak throughput. The goal is to maximize the effective throughput that each unit of hardware delivers while meeting service quality requirements.
2. Understanding the Three Parallelism Methods
Tensor Parallelism (TP) splits the weight matrices of each layer across multiple accelerators, which then work together on the same forward pass. Its advantages are shorter compute time per request and lower memory pressure per accelerator. Its cost is a collective communication step, such as All-Reduce, after each layer. Communication happens often, and as the device count grows, communication takes up a larger share of the total time.
Data Parallelism (DP) keeps a complete copy of the model on each accelerator, and each copy processes different requests independently. It requires no intra-layer communication, and requests do not interfere with each other, which suits high-concurrency workloads. Its cost is that every replica holds the full model in memory, so memory utilization is lower.
Expert Parallelism (EP) applies only to models with a Mixture-of-Experts (MoE) architecture. Different experts are assigned to different accelerators, and each token activates only a few experts. Routing requires All-to-All communication, so performance depends heavily on interconnect bandwidth.
These methods can be combined. For example, 8 accelerators can form 4 replicas, with each replica using tensor parallelism across 2 devices. This configuration is written as TP2 with DP4. It balances single-request latency against concurrent throughput.
3. Clarifying “Throughput Under SLO”
Before discussing throughput, you need to define the service level objectives (SLOs). For LLM inference, common constraints include:
- An upper bound on the P99 or P95 time to first token (TTFT);
- An upper bound on the average time per output token (TPOT);
- An overall end-to-end request timeout.
“Throughput under SLO” means the maximum request rate or output token rate the system can sustain while all of the above latency metrics stay within their targets. Looking only at peak throughput and ignoring tail latency often produces results that cannot be used in a production service.
Evaluation should hold the input length distribution, output length distribution, and concurrency pattern constant. Otherwise, numbers from different tests cannot be compared.
4. Choosing a Parallelism Strategy
Follow these steps to choose a parallelism scheme:
- Confirm the memory requirement of the model. Calculate the total footprint of the weights, KV cache, and activations. If a complete model does not fit on one accelerator, you must introduce TP or EP.
- Identify the workload type. Services with short inputs and high concurrency benefit more from DP. Scenarios with long context, low concurrency, and sensitivity to single-request latency depend more on TP.
- Estimate communication overhead. TP communication volume depends on the number of layers and the hidden dimension, and its share of total time rises as the device count increases. Check whether communication time has become the bottleneck.
- Run comparison experiments across candidate schemes. Compare at least pure TP, pure DP, and one or two hybrid schemes, and record throughput under the same SLO conditions.
Using 8 accelerators as an example, pure TP8 may have low single-request latency but high communication overhead. TP2 with DP4 reduces the communication scope and handles concurrency better. Measured results should determine which option is better.
5. Overlapping Communication with Computation
In multi-accelerator inference, the bottleneck is often waiting for communication rather than computation. Common optimization directions include:
- Communication-computation overlap. While one block of data is being communicated, start the next computation segment early to reduce idle waiting.
- Sequence parallelism. Split the token-wise operations along the sequence dimension. This reduces activation memory and aligns better with the communication flow.
- Communication operator fusion. Merge several small communications into larger transfers to reduce launch overhead.
The effect of these optimizations depends on the specific interconnect topology and the implementation of the communication library. Base decisions on profiling data rather than applying them without testing.
6. Graph Compilation and Operator Optimization
Inference engines usually provide graph compilation, which turns dynamic execution flows into static computation graphs. This reduces Python scheduling and kernel launch overhead. Common practices include:
- Precompiling commonly used input shapes so that the first online request does not trigger compilation;
- Using fused operators for hot operators such as attention, normalization, and activation functions;
- Combining quantization schemes, and confirming that quantized operators have efficient implementations on the target hardware.
Graph compilation increases deployment time and memory usage, so you need to balance startup time against runtime efficiency.
7. Interpreting Optimization Case Data
A publicly reported case ran on 8 domestically produced AI accelerator cards. It changed the baseline TP8 configuration to TP2 with DP4 and combined this with expert parallelism, sequence parallelism, and graph compilation. Under the same SLO, total throughput increased by up to about 53.5%.
Read this figure with the following in mind:
- It applies only to that model, hardware, workload distribution, and SLO threshold. It cannot be generalized directly to other scenarios.
- The gain comes from the combined effect of several changes. It cannot be attributed to any single change.
- The actual benefit also depends on memory headroom, flexibility in scaling, and operational complexity.
Treat the case as a reference for tuning direction, then reproduce the experiments in your own environment.
8. A Reusable Tuning Workflow
Follow this workflow:
# Illustrative configuration. Parameter names describe purpose only and do not correspond to the actual interface of any specific framework.baseline:tp_degree: 8dp_degree: 1candidate_a:tp_degree: 2dp_degree: 4ep_enabled: true # Only applicable to MoE modelsseq_parallel: truegraph_compile: trueworkload:input_len: [512, 2048] # Input length distributionoutput_len: [128, 512] # Output length distributionconcurrency: [8, 16, 32, 64]slo:ttft_p99_ms: 2000tpot_avg_ms: 50
Execution steps:
- Fix the workload distribution and SLO, run the baseline, and record its metrics.
- Introduce optimizations one at a time, changing only one variable per run, and keep each result for comparison.
- For each configuration, measure the maximum throughput within the SLO boundary.
- Use profiling tools to determine whether the bottleneck is computation, communication, or scheduling.
- Archive the final configuration, performance report, and failed attempts so the team can reuse them.
9. Common Pitfalls
- Looking only at peak throughput. Peak throughput often comes with tail latency that exceeds the SLO, which makes the configuration unusable in production.
- Increasing TP degree without limit. As the device count grows, communication overhead can offset the computation gains.
- Ignoring the workload distribution. Conclusions drawn from short-text tests may not hold for long-text services.
- Treating a single experiment as a conclusion. Repeat tests and observe the range of variation.
10. Summary
The core of tuning 8-accelerator LLM inference is finding the balance point among memory, communication, concurrency, and latency that fits a specific workload. TP, DP, and EP each have limits, and hybrid parallelism often fits better than any single method. Communication overlap, sequence parallelism, and graph compilation can improve efficiency further.
Performance figures are meaningful only when the model, hardware, workload, and SLO are stated. A standardized controlled-experiment process lets a team turn the lessons from one optimization effort into a reusable deployment plan.
