Running Large Model Inference on Chinese AI Accelerators: Tuning Practices That Raised Throughput by 53.5%

    This article walks through a tuning case study for serving a hundred-billion-parameter-scale large language model on eight Chinese-made AI accelerator chips. It explains why default deployment configurations often underperform, how restructuring the parallelism strategy, communication, and compilation settings raised total throughput by up to 53.5% under the same latency SLOs, and how to turn tuning results into reusable deployment configurations.

    1. Background: Why LLM Inference Often Fails to Fully Utilize Chinese AI Accelerators

    As large models move into more business scenarios, many teams are migrating inference workloads to Chinese-made AI accelerator chips. In practice, deploying with default configurations often yields actual throughput far below the hardware’s theoretical peak. The causes typically fall into the following areas:

    1. The parallelism strategy does not match the workload. Default configurations often reuse the tensor-partitioning approach from the training stage. Inference workloads, especially high-concurrency, short-output scenarios, are sensitive to inter-card communication, memory usage, and request scheduling in ways that differ entirely from training.
    2. Communication overhead is underestimated. With high tensor parallelism degrees, every generated token requires multiple rounds of inter-card AllReduce communication. Communication time can exceed computation time, leaving much of the compute idle.
    3. Operators and graph compilation are not tuned for the hardware. Newly released chip models typically come with new compilation capabilities. If these are not enabled, the execution efficiency of hot operators can fall well below what is achievable.
    4. Deployment experience is hard to reuse. Each team has to work out engine selection, image matching, and parameter configuration from scratch, so repeating the same mistakes is very costly.

    Recently, a tuning exercise on a hundred-billion-parameter-scale large model (referred to as “the target model” below) ran on eight of the latest Chinese-made AI accelerator chips. Through systematic configuration restructuring, and while meeting the same latency SLOs, total throughput rose by up to 53.5%. This article walks through the approach, the techniques, and how the lessons were documented for reuse.

    2. Establishing a Comparable Baseline

    Any performance optimization must first answer one question: compared with what? The first step was to run the baseline and the optimized setup under identical test conditions:

    • Same hardware: eight accelerator chips of the same model, deployed on one complete machine.
    • Same SLO constraints: time to first token (TTFT) and time per output token (TPOT) serve as hard constraints. Only throughput that satisfies the SLOs counts in the comparison, because throughput without latency limits has no practical meaning.
    • Same inference engine and quantization configuration: both setups used the hardware-adapted version of a mainstream open-source inference engine and loaded the same quantized weights.

    The baseline used the most straightforward configuration: tensor parallelism TP=8 and data parallelism DP=1. In this setup, all eight cards serve a single model instance, and all requests go to the same set of processes. Many teams use this as their default when deploying large models, but it is not always the best choice.

    3. Core Optimization 1: Redesigning the Parallelism Strategy

    3.1 Where TP=8 Falls Short

    Tensor parallelism splits each layer’s weight matrices across the cards. This reduces per-card memory pressure and lowers single-request latency. The cost is that every decoding step requires synchronization across cards. As concurrency rises, many requests merge into batches that are decoded together. The number of communication rounds grows linearly with the number of decoding steps. Inter-card bandwidth then becomes the bottleneck, and the compute capacity of eight cards cannot be fully used.

    3.2 Switching to TP=2 and DP=4, with Expert Parallelism

    The optimized configuration uses TP=2, DP=4, combined with expert parallelism (EP):

    • TP reduced from 8 to 2: The communication scope between cards shrinks, and the synchronization overhead per decoding step drops substantially.
    • DP increased to 4: The system runs four independent inference instances and distributes requests among them. This improves concurrent processing capacity and gives the batch scheduler more flexibility.
    • Expert parallelism: For models with a mixture-of-experts architecture, different experts are placed on different cards, and tokens move between cards according to routing results. Each card no longer needs to hold the full set of expert weights, which saves memory and improves the locality of expert computation.

    The core idea is to align the parallel structure with the concurrency characteristics of the inference workload, rather than simply reusing the weight-partitioning habits from training. For high-concurrency online services, a moderate TP combined with a higher DP usually performs better than an extreme TP setting.

    4. Core Optimization 2: Communication and Compilation Tuning

    After the parallelism change, two more areas of overhead are worth addressing.

    4.1 Sequence Parallelism Communication Optimization

    Even with TP reduced to 2, the attention and MLP layers still carry redundant activations along the sequence dimension, along with necessary collective communication. Sequence-parallel optimizations, often referred to in the industry as FlashComm-style approaches, split activations along the sequence dimension. Some AllReduce operations are replaced with operations that move less data. This further reduces the data transferred between cards and lowers the degree to which communication blocks the compute pipeline.

    4.2 NPU Graph Mode and Kernel Compilation

    Newer chip models typically offer two types of compilation capability:

    • Graph mode: The entire computation graph is compiled and dispatched at once. Optimizations such as operator fusion and memory planning can then work across operators, reducing scheduling and memory access overhead.
    • Kernel-level compilation: Hot operators in the model, such as attention, GEMM, and quantization/dequantization, are compiled specifically. This produces implementations that better match the hardware microarchitecture.

    In practice, graph compilation usually has a long warm-up time. Compilation caches should be built before the service goes live, so that the first request does not trigger just-in-time compilation and time out.

    5. Results and Attribution

    Under the same SLOs, the optimized setup achieved up to 53.5% higher total throughput than the TP=8 baseline. The gain comes from three stacked effects:

    1. Parallelism restructuring contributed the largest share. Fewer communication rounds and more concurrent instances together freed compute that had been blocked by communication.
    2. Communication optimization further reduced synchronization overhead on top of TP=2.
    3. Compilation optimization improved single-operator execution efficiency and reduced the compute time per token.

    The optimized setup’s latency at low concurrency stayed close to the baseline. Its throughput advantage was most pronounced at high concurrency, which indicates that the gains mainly come from better capacity under heavy concurrent load.

    6. Turning One Tuning Effort into a Reusable Deployment Plan

    A single optimization has limited value. What matters more is making the experience reusable. Some platforms have started organizing deployment configurations for combinations of model, hardware, engine, and parameters into structured solution catalogs. The core elements of these catalogs include:

    • Solution description: For a specific model and hardware combination, the inference engine, container image, required number of cards, and memory specifications.
    • Deployment parameters: The complete configuration, including the parallelism strategy, quantization method, scheduling parameters, and compilation switches.
    • Performance reports: Throughput and latency data for both the baseline and the optimized version, along with the test conditions, for side-by-side comparison.

    This organization brings three direct benefits. It lowers selection cost, because teams can search for existing solutions by model and hardware as a starting point. It ensures reproducibility, because parameters are fully recorded, so no one is left with a configuration that works but cannot be explained. It also supports incremental validation, because verified configurations serve as a baseline that teams can adjust for their own traffic patterns.

    For teams running on Chinese-made compute, the recommended path is as follows: select a similar configuration from a solution catalog → re-measure the baseline on your own hardware and workload → tune step by step in the order described in this article (parallelism strategy, then communication, then compilation), recording each change → write the final configuration back into the catalog. This creates a positive feedback loop, so each tuning effort becomes an organizational asset.

    7. Summary

    In LLM inference optimization, the biggest gains usually come from matching the configuration to the structure of the hardware and workload. The parallelism strategy defines the skeleton of communication and concurrency. Communication optimization sets the lower bound on synchronization overhead, and compilation optimization sets the upper bound on single-operator efficiency. Storing verified configurations as searchable, reproducible deployment plans lets teams move from repeated trial and error to steady accumulation of deployment experience on Chinese-made compute. The 53.5% throughput gain on eight cards is one concrete example of this methodology in practice.