Optimizing Inference Throughput on 8-GPU Domestic AI Accelerators: A Practical Guide
This guide explains how to raise inference throughput on an 8-GPU setup using domestic AI accelerators. It identifies the three main sources of loss—inter-GPU communication, uneven load, and execution overhead—and shows how to maximize throughput under SLO constraints by moving from pure tensor parallelism to hybrid parallelism, adding sequence parallelism and graph-mode compilation, and following a repeatable tuning workflow. It also lists common pitfalls to avoid.
Optimizing Inference Throughput on 8-GPU Domestic AI Accelerators: A Practical Guide
1. The Problem: Why 8-GPU Setups Fall Short on Throughput
When deploying large generative models on domestic AI accelerators, teams often see the same gap: the hardware looks more than sufficient on paper, but stress tests never reach the expected numbers. The bottleneck is rarely single-GPU compute. It usually comes from three systemic sources of loss.
The first is communication overhead. Tensor parallelism splits each layer’s matrix operations across multiple GPUs, requiring frequent reductions and broadcasts during the forward pass. Once inter-GPU bandwidth becomes the limit, compute units sit idle waiting.
The second is load imbalance. With pure data parallelism, every replica loads the full model, which puts heavy pressure on memory, and uneven request distribution leaves some replicas queued while others sit idle.
The third is execution efficiency. In dynamic-graph mode, operator scheduling and how well operator implementations match hardware characteristics both add overhead. This loss grows further under long sequences and high concurrency.
So the goal in an 8-GPU environment is not to “keep every GPU busy.” It is to pipeline compute, communication, and memory access so that the number of effective requests per unit time is maximized, without violating first-token latency or per-request latency constraints.
2. Core Idea: Maximize Throughput Under SLO Constraints
The first step is to define the constraints. Throughput gains that come at the cost of latency are meaningless in production. In practice, teams usually set two limits: a maximum first-token latency and a maximum end-to-end latency. Every adjustment to parallelism strategy, batching parameters, and compiler options is searched within those two boundaries.
Abstractly, the problem can be written as:
maximize total_throughput(tokens/s or requests/s)subject to TTFT <= T1TPOT/end-to-end latency <= T2memory usage <= per-GPU capacity
The point of this formulation is that tuning is not a gamble on a single parameter. It is a search for a better solution inside the feasible region. Any configuration change must be checked against the stress-test curve to confirm it is still feasible.
3. Reworking Parallelism: From Tensor-Parallel-Only to Hybrid
3.1 Limits of the Baseline
The most common baseline in an 8-GPU setup is pure tensor parallelism (tp=8, dp=1). It keeps memory usage low and per-request latency stable, but concurrency is weak: all requests share the same compute resources, inter-GPU communication is at its highest, and there is little room to scale batching.
3.2 The Optimization: Smaller Tensor Parallelism, Wider Data Parallelism
Switching to tp=2, dp=4 means splitting the model across two GPUs to form four replicas, then distributing requests at the replica level. This brings three gains:
- The communication domain shrinks from eight GPUs to two, fewer participants take part in reductions, and communication latency drops significantly;
- With more replicas, the scheduler can send different requests to different replicas, lowering the chance of queuing;
- Batching is still possible inside each replica, so overall concurrent throughput rises.
Illustrative configuration comparison:
# Baselineparallel:tensor_parallel_size: 8data_parallel_size: 1# Optimizedparallel:tensor_parallel_size: 2data_parallel_size: 4expert_parallel: true
There is no universal best ratio of tp to dp. It depends on model structure, the distribution of sequence lengths, and the inter-GPU topology. A practical approach is to fix the smallest tp that still fits in memory, assign all remaining GPUs to dp, and then fine-tune from there.
3.3 Combining with Expert Parallelism
For models with a sparse expert structure, expert parallelism places different experts on different GPUs so that no GPU holds all expert weights. Combining it with data parallelism requires close attention to routing balance: if some experts are selected too often, individual GPUs become overloaded. Load-balancing policies and capacity factor settings are therefore needed to prevent hotspots.
4. Communication and Execution Optimizations
4.1 Sequence Parallelism
Sequence parallelism splits computation along the sequence dimension, turning operations that repeatedly synchronize within the tensor-parallel group into finer-grained segments. This cuts redundant computation and synchronization waits. In long-context, high-concurrency scenarios, it often improves latency and throughput at the same time.
4.2 Graph Mode and Operator Compilation
Dynamic-graph execution schedules operators one by one at runtime, and the overhead accumulates with depth. With graph capture and operator compilation enabled, an entire subgraph is compiled ahead of time into a hardware-oriented execution plan, so operator fusion, memory reuse, and scheduling order can all be optimized statically. Key practices:
- Graph mode is sensitive to input shapes, so fix or bucket sequence lengths to avoid frequent recompilation;
- The first compilation has a warm-up cost, so both stress tests and production rollouts should include a warm-up phase; otherwise the numbers are misleading;
- Persist the compilation cache so recompilation is not repeated on every restart.
4.3 Working with Quantized Models
Deploying on quantized weights lowers memory usage and memory-access pressure, leaving room for larger batches. However, quantization introduces extra operators, and you need to confirm they are correctly fused in graph mode; otherwise the gains are offset by scheduling overhead.
5. A Reusable Tuning Workflow
Proceed in the order below instead of trying parameters blindly:
- Establish a baseline: fix the model, quantization method, and input length distribution, and record the baseline throughput and latency curves.
- Determine the feasible region: scan the batching limit to find the maximum concurrency that meets the SLOs.
- Adjust the parallelism ratio: try lowering tp and raising dp first, and watch how the communication share changes.
- Layer in communication optimizations: introduce sequence parallelism and compare the improvement on long sequences.
- Enable compilation optimizations: verify operator fusion in graph mode and complete warm-up.
- Run regression checks: retest under a real traffic distribution and confirm there is no tail-latency regression.
- Capture the configuration: archive the engine version, image, resource specs, parameters, and stress-test report together as a reusable solution.
6. Common Pitfalls
- Chasing peak throughput only: a throughput number that ignores SLOs cannot be deployed, so latency distribution must be reported alongside it.
- Copying someone else’s parameters: the parallelism ratio is tightly coupled to hardware topology, and copying it across environments usually fails.
- Skipping warm-up: compiled execution paths perform very poorly during cold start, which easily leads to the wrong conclusion that an optimization did nothing.
- Ignoring routing hotspots: under sparse structures, load imbalance lets the slowest GPU hold back overall throughput.
- No baseline for comparison: without a baseline in the same environment, no improvement can be attributed.
7. Conclusion
Getting high throughput from an 8-GPU domestic accelerator setup comes down to moving the optimization target up from “single-GPU operators” to “parallelism topology and the execution path.” Use SLOs as the boundary, rework parallelism first to shrink the communication domain, then layer in sequence parallelism and compilation optimizations to raise execution density, and finally use a standardized workflow to turn the configuration into a reusable asset. This approach does not depend on a specific product and applies to mainstream domestic compute platforms and inference engines, so teams can validate and iterate quickly against their own hardware and workloads.
