8-Card LLM Inference Tuning on Chinese AI Accelerators: Up to 53.5% Throughput Gain
Deploying large language models on Chinese AI accelerators often produces lower throughput and higher latency than expected, even when the same model and the same number of cards are used. This article explains why the root cause is usually deployment configuration rather than raw hardware, and how successful tuning experience can be organized into reusable deployment assets. It then walks through an 8-card inference case with a quantized Mixture-of-Experts model: the baseline TP8/DP1 setup was replaced with TP2+DP4 plus expert parallelism, and combined with sequence parallelism and graph/kernel compilation optimizations. Under the same latency SLO, total throughput increased by up to 53.5%. The article closes with a practical, repeatable tuning methodology for similar deployments.
Background: Why LLM Inference Is Hard on Chinese AI Accelerators
As Chinese AI accelerators continue to close the raw compute gap with mainstream international products, many teams are moving large language model inference workloads onto these platforms. A common finding is that the same model on the same number of cards delivers lower throughput and worse latency than expected.
The root cause is usually not the chip itself, but the deployment configuration. LLM inference is a compute- and communication-intensive process. It involves choices around tensor parallelism, data parallelism, and expert parallelism, as well as a software stack covering operator fusion, computation graph compilation, and communication optimization. There is no universal optimal configuration. The right setup depends on the hardware topology, the model structure, and the workload characteristics.
For most teams, the tuning path is costly: choosing an inference engine, configuring the runtime image, deciding how many cards to use, selecting a parallel strategy, and identifying which optimizations actually matter all require repeated experimentation. That is why capturing successful deployment experience as reusable solution assets is valuable.
Turning Deployment Experience into Reusable Assets
A practical approach is to build a model deployment solution catalog. Each solution is organized around a specific “model + hardware” combination and records:
- Inference engine and runtime image: matching engine versions to images to avoid hidden performance loss caused by environment inconsistency.
- Resource requirements: how many cards the model needs on that hardware, and how much memory is consumed.
- Deployment parameters: the full configuration list, including parallel strategy, quantization settings, and service parameters.
- Baseline and optimized performance data: for a tuned solution, throughput at the same SLO for both the baseline and optimized configurations, along with the tuning report.
This organization provides several benefits:
- Searchable: users can look up solutions by model or hardware dimension.
- Comparable: performance data for the same model across different hardware and configurations can be displayed side by side, making hardware selection more evidence-based.
- Executable: the deployment backend can consume the configuration directly, closing the loop from “browse to deploy” and avoiding errors from manually copying configuration values.
In the Chinese accelerator ecosystem, this catalog already contains deployment solutions for multiple generations of accelerator cards. The following optimization case is one example.
Case Study: Tuning an 8-Card LLM Inference Deployment
Test Environment and Baseline
The test used 8 cards from a specific Chinese AI accelerator, a hardware-adapted build of a mainstream open-source inference engine, and a quantized MoE large language model.
The baseline configuration was straightforward:
- Tensor Parallelism 8 (TP8)
- Data Parallelism 1 (DP1)
In other words, all 8 cards served one model replica, and every request was handled by that single replica.
TP8 gives each replica a large capacity. However, the finer the tensor slicing, the more frequent the intra-layer communication becomes, such as All-Reduce after matrix multiplication. With all 8 cards fully sliced, communication overhead becomes a significant fraction of total execution time. At the same time, with only one replica, request scheduling concurrency is limited and it is difficult to fully utilize the independent compute capacity of multiple cards.
Optimization 1: Rework the Parallel Strategy
The first optimization changed the setup to:
- TP2 + DP4
Expert Parallelism (EP)
TP2: Each replica only uses 2 cards for tensor slicing, which greatly reduces the scale and frequency of intra-layer All-Reduce communication.
- DP4: Four model replicas serve requests in parallel, load balancing across replicas and improving overall concurrency and scheduling elasticity.
- Expert Parallelism: For the MoE model, expert parameters are distributed across cards so that expert computation can run in parallel, reducing both memory pressure and compute bottlenecks caused by expert weights.
The core idea is to match the communication pattern to the hardware topology. This reduces the number of cross-card communication operations and shrinks communication granularity. At the same time, data parallelism provides throughput elasticity, while expert parallelism aligns with the MoE structure. Together, they improve the efficiency of compute/communication overlap.
Optimization 2: Sequence Parallelism and Compilation Optimizations
In addition to the parallel strategy, two system-level optimizations were enabled:
- Sequence parallelism: The context sequence dimension is split, distributing part of the activation memory and attention computation across multiple cards. This reduces per-card pressure and lowers some communication volume.
- NPU graph and kernel compilation optimization: The chip’s graph compilation capability is used for operator fusion, memory layout optimization, and kernel-level tuning. This reduces operator dispatch overhead and improves utilization of on-chip compute resources.
These optimizations require no changes to the model itself. They are pure software-stack gains with high value, but they depend on a solid understanding of the hardware software stack and are usually the hardest part to discover through trial and error.
Result: Up to 53.5% Throughput Gain Under SLO
It is important to note that this comparison is made under the same latency SLO. The optimization does not trade latency for throughput. Instead, it improves throughput while keeping service quality unchanged.
In the final test, the tuned setup improved total throughput by up to 53.5%.
The logic behind this result can be summarized as:
Parallel strategy determines communication structure → communication structure determines compute/communication overlap efficiency → sequence parallelism and compilation further reduce overhead → more effective compute is released under the SLO constraint.
A Reusable Tuning Methodology
From this case, a general tuning path can be extracted for inference on Chinese AI accelerators:
- Build a baseline first, then optimize: Start with the simplest configuration, such as full tensor parallelism, run it, and record throughput under the SLO as a reference point.
- Check whether the parallel strategy matches the hardware topology: A high TP degree often means a communication bottleneck. Consider lowering TP and introducing a mixed DP + EP strategy.
- Prioritize expert parallelism for MoE models: Decouple expert placement from data parallelism so that expert computation can be distributed efficiently.
- Use sequence parallelism and compilation optimizations: These do not change the model or business code and usually provide stable additional gains.
- Evaluate everything under the SLO: Throughput without a latency constraint is meaningless. Stress tests should be performed under a fixed SLO.
Conclusion
Tuning LLM inference in a Chinese accelerator environment is essentially a three-dimensional matching problem: hardware characteristics × model structure × workload characteristics.
Storing successful tuning results as structured deployment assets, including complete configurations and baseline/optimized data, allows later teams to make incremental improvements instead of repeating the same debugging process. As the domestic accelerator ecosystem continues to mature, this practice of turning experience into reusable assets will become an important foundation for efficient LLM inference deployment.
