Boosting Inference Throughput by 53.5% on Domestic 8-Accelerator Nodes: A Practical Guide
This article presents a practical approach to improving inference throughput on a single node with eight domestic accelerators. It explains how to define SLOs first, establish a reproducible baseline, shift from deep tensor parallelism to a hybrid TP/DP topology with expert parallelism, and apply execution-layer optimizations such as sequence parallelism, graph execution, and operator compilation. The combined changes raised total throughput by up to 53.5% under a fixed SLO, and the article closes with an ablation checklist and a way to turn deployment configurations into reusable team assets.
1. Why 8-Accelerator Domestic Compute Needs Systematic Tuning
When deploying large generative models in a domestic (Xinchuang) compute environment, the hardest question is rarely “does it run.” It is “how much concurrency can a unit of hardware carry while still meeting the service level objective (SLO).” A single node with eight domestic accelerator cards is a good example: it is cost-effective and widely reused as a deployment unit. At this scale, the bottleneck is usually not one factor but the combined effect of four: how parallelism is partitioned, communication overhead, compilation and graph execution efficiency, and the quantization strategy.
A typical inference tuning effort has one goal: push the effective throughput of the whole node higher without degrading time-to-first-token or per-request generation rate. The critical phrase is “without degrading.” Throughput discussed outside an SLO has no engineering meaning, because numbers obtained by piling on unlimited concurrency show up in production as timeouts and a collapsed user experience. Every optimization below therefore assumes the same order of work: define the SLO first, then compare throughput.
2. Setting the Baseline: Prerequisites for a Trustworthy Comparison
To tell whether an optimization is real, the baseline must be clean and reproducible. In practice, fix these variables:
- Identical hardware and driver stack: accelerators from the same batch, same firmware and runtime versions.
- Identical model and quantization format: same weight precision, same quantization method, same context length limit.
- Identical engine and image: baseline and optimized runs use the same inference engine and base image, changing configuration only.
- Identical benchmarking methodology: same input/output length distribution, same concurrency gradient, same SLO thresholds.
The baseline uses pure tensor parallelism (TP=8, DP=1), the most common industry starting point because it is simple to implement and memory partitioning is intuitive. Its structural weaknesses are equally clear: all requests share one set of operator instances, batch scheduling is coarse, and the AllReduce volume of tensor parallelism grows linearly with the number of cards. During the decode phase (token-by-token generation) this easily becomes a communication bottleneck, leaving accelerators idle while they wait.
3. Optimization Path 1: From Deep Partitioning to Hybrid Partitioning
The first step is changing the parallel topology from TP8/DP1 to TP2/DP4: shard weights across two cards with tensor parallelism, then create four data-parallel replicas inside the node, with the scheduler spreading concurrent requests across the four instances. This yields three benefits:
- Smaller communication domain. Tensor-parallel synchronization shrinks from eight cards to two, cutting cross-card hops and data volume and reducing synchronization waits during decode.
- Higher concurrency capacity. Four replicas mean four independent batch queues, finer-grained scheduling, a lower chance that long and short requests block each other, and more controllable tail latency.
- More balanced memory and batch size. TP2 leaves headroom within each replica that can be used to enlarge the KV cache and the concurrent batch, holding more in-flight requests at the same SLO.
For models built on a mixture-of-experts (MoE) structure, expert parallelism (EP) is also needed: expert weights are distributed across cards along the expert dimension and dispatched on demand according to routing results. Expert parallelism avoids the memory waste of storing all experts on every card and spreads the compute pressure of hot experts. Note that it adds routing and All-to-All communication, so it must be designed together with the TP/DP partitioning rather than simply stacked on top.
Illustrative configuration comparison (topology only, not a specific product interface):
# Baseline: deep tensor shardingparallel:tensor_parallel_size: 8data_parallel_size: 1# Optimized: hybrid partitioning + expert parallelismparallel:tensor_parallel_size: 2data_parallel_size: 4expert_parallel_size: 4enable_expert_parallel: true
4. Optimization Path 2: Sequence Parallelism, Graph Compilation, and Operator Compilation
Beyond topology, the second category of gains comes from execution-layer efficiency:
- Sequence parallelism: for long contexts, partition computation and operations such as normalization along the sequence dimension, lowering peak activation memory per card, making larger batches possible, and avoiding repeated computation in operations like LayerNorm.
- Graph mode execution: replace dynamic single-operator dispatch with whole-graph capture and replay, reducing host-side scheduling overhead and gaps between operator launches. This pays off for decode-phase workloads made of small operators issued at high frequency.
- Operator compilation: compile-time operator fusion and memory layout changes reduce reads and writes of intermediate tensors and relieve memory bandwidth pressure, keeping compute unit utilization steadier.
These three share a trait: they do not change the mathematical semantics of the model, only how it executes. They can therefore be validated on the same weights, carry relatively low risk, and are the easiest to obtain on domestic accelerators through vendor-provided compilation and communication optimization switches.
5. Reading the Results: Where the 53.5% Comes From
On eight domestic accelerator cards, with the same quantized model and the same SLO thresholds, this combination raised total node throughput by up to 53.5% over the baseline. The breakdown is roughly: the parallel topology change contributed the largest share (communication convergence plus higher concurrency), execution-layer optimizations contributed a steady mid-range gain, and expert parallelism raised the throughput ceiling further in the high-concurrency range.
These numbers are strongly environment-dependent. Context length distribution, input-to-output ratio, SLO strictness, and the quantization scheme all change the conclusion. The safer engineering practice is to make each optimization a switch in a matrix, run ablations one item at a time, record throughput and P99 latency at every concurrency level, and build a performance curve for your own workload instead of copying someone else’s single number.
6. Making the Experience Reusable: A Catalog of Deployment Plans
Choosing a model is only the start of deploying in a domestic compute environment. What actually consumes team time is matching engine and image, deciding how many cards are needed, how to partition parallelism, and which switches help the current workload. A workable approach is to organize this context into a browsable “deployment plan catalog,” where each entry is keyed by a specific model plus specific hardware and records the engine, image, resource requirements, and key parameters, along with both baseline and optimized configurations and their benchmark reports. The deployment backend can sync configurations directly from the catalog, enabling one-click startup and fast rollback.
In related practice at Baidu AI Cloud, such capabilities are typically split into three general categories: a container platform hosting inference instances, object storage holding weights and images, and logging plus monitoring and alerting for observability, all managed as configuration-as-code. This turns tuning experience from personal notes into a team asset.
7. Implementation Checklist
- Define the SLO first: set time-to-first-token and generation rate thresholds before discussing throughput.
- Fix the variables: keep hardware, quantization, engine, and benchmarking methodology aligned.
- Prioritize topology: try hybrid TP/DP partitioning first, then add expert parallelism.
- Tune the execution layer: ablate sequence parallelism, graph execution, and operator compilation one by one.
- Let data decide: produce a concurrency-throughput-latency set of curves and keep rollback-capable configurations.
- Capture the experience: catalog configurations and reports into searchable, reusable deployment assets.
Following this path, an 8-accelerator domestic compute node has substantial room for inference throughput improvement, and more importantly the team gains a portable, verifiable performance engineering method.
