MoE Model Deployment on 8 Accelerators: Up to 53.5% Higher Throughput Under SLO Constraints

    This article explains how to optimize multi-accelerator MoE inference deployments by balancing tensor parallelism, data parallelism, expert parallelism, communication, and compilation. Using an eight-accelerator deployment as an example, it compares a TP=8 baseline with a TP=2, DP=4 configuration and shows why SLO-constrained effective throughput is a more meaningful metric than raw TPS alone.

    Why Production AI Inference Deployments Are Difficult

    When large-model inference scales from a single accelerator to a multi-accelerator cluster, the parallelism strategy directly affects hardware utilization and end-to-end performance. The optimal configuration can change completely when the same model is moved to a different accelerator platform. Engineers must satisfy business latency SLOs while maximizing throughput, but these objectives often compete with each other.

    Optimization results also depend heavily on operational experience. Whenever the hardware changes or the model is upgraded, teams may need to repeat the tuning process: verifying inference engine compatibility, planning accelerator counts and memory usage, and adjusting communication-library parameters. These details collectively determine production performance. A single incorrect setting can cause a significant degradation.

    How to Standardize Deployment Configurations

    A multi-accelerator inference deployment should describe more than model weights. It should capture the complete runtime environment and configuration. A comprehensive deployment profile typically includes four categories of information:

    • Inference engine and version: Different engines vary significantly in operator implementations and memory management. The selected version must be well matched to the target hardware.
    • Container image and dependencies: Acceleration libraries, communication libraries, and related components must be compatible with the inference engine.
    • Resource specifications and parallelism strategy: Accelerator count, partitioning method, and batch size directly affect resource efficiency.
    • Performance baselines: Baseline and optimized throughput and latency should be recorded for future comparison.

    These profiles can be organized in an online catalog. Users can search by hardware model, model name, or task type, then compare the performance of different configurations. If a deployment platform can read the configuration parameters directly, it can automate environment setup and model startup, turning the experience of tuning engineers into a reusable toolchain.

    A deployment profile may use fields such as the following:

    Field Example
    Hardware and accelerator count Domestic AI accelerators, 8 cards
    Inference engine and version Engine name and version
    Image and dependencies Specific versions of acceleration and communication libraries
    Parallelism strategy TP=2, DP=4, expert parallelism enabled
    Batch size Based on measured results
    SLO threshold For example, P99 latency must remain below the business limit
    Baseline throughput and P99 Comparison data from the same test set

    Three Common Pitfalls Before Tuning

    The first is an incompatibility between the inference engine and communication libraries. Version mismatches can force operators onto inefficient execution paths or cause runtime errors. The image and dependency manifest should be checked item by item before deployment.

    The second is excessive tensor parallelism, which can increase synchronization wait time. As TP grows, every layer depends on all participating accelerators completing synchronization. Once inter-device communication becomes a larger share of execution time, adding more accelerators may no longer improve throughput.

    The third is uneven expert routing, which can increase tail latency. If most tokens are routed to a small number of experts, the devices hosting those experts become bottlenecks. P99 latency can rise substantially even when average latency appears normal.

    Choosing a Parallelism Strategy for an Eight-Accelerator MoE Deployment

    Experimental Environment and Baseline

    The experiment used eight domestic AI accelerators. The inference engine was adapted for the target hardware, and the workload used a quantized MoE model. The baseline configuration used tensor parallelism with TP=8 and data parallelism with DP=1.

    The following conditions must be recorded for the comparison to be reproducible:

    • Accelerator model and driver version
    • Inference engine version and quantization method
    • Model size and number of experts
    • Test dataset, request-length distribution, and concurrency
    • Batch size
    • P99 latency SLO threshold and rate-limiting rules
    • Measurement methodology, including repetition count and variance

    The main issue with the baseline is that MoE expert routing and result aggregation generate substantial inter-device communication. With TP=8, every layer requires all eight accelerators to participate in synchronization, which can significantly increase waiting time.

    Core Changes in the Optimized Configuration

    The optimized configuration changed the parallelism strategy to TP=2 and DP=4, while enabling expert parallelism:

    Field Baseline Optimized Key Difference
    Tensor parallelism TP=8 TP=2 Smaller synchronization groups and lower synchronization overhead
    Data parallelism DP=1 DP=4 Four data streams process different request batches in parallel
    Expert parallelism Disabled Enabled Routes tokens according to expert placement and reduces broadcast-style communication
    Communication optimization Default Sequence parallelism plus graph compilation Reduces communication wait time

    With TP=2, each communication group contains fewer devices, reducing synchronization overhead. DP=4 allows four independent data streams to process requests, increasing overall concurrency. With expert parallelism enabled, expert modules are distributed across devices, and tokens are sent only to the devices hosting their target experts instead of being broadcast to every device.

    This communication pattern uses routed all-to-all or localized communication. The communication volume depends on how evenly experts are distributed and on the routing results. It will often decrease, but the reduction must be confirmed through measurement; there is no fixed exponential scaling rule.

    The effectiveness of TP=2, DP=4, and expert parallelism depends on the number of experts, the communication topology, and request distribution. This combination worked in the experiment, but it is not a universally optimal configuration for every MoE model.

    Optimizing Communication and Compilation

    Sequence parallelism divides the input sequence across devices so that each accelerator computes attention for only part of the sequence. To preserve global context, devices must exchange the necessary intermediate results, creating cross-device communication. Its benefits are most visible with long sequences. For short sequences, communication overhead may exceed the saved computation. Sequence parallelism is generally used together with tensor parallelism.

    Graph compilation optimizes the model computation graph as a whole. It can fuse adjacent operators, reduce kernel-launch counts, and avoid routing every operator through Python-level scheduling. Graph-level memory reuse and execution-stream optimization also become possible. Kernel compilation can generate more efficient machine code for the target hardware instruction set.

    Graph compilation works best when the model structure is stable and input shapes are fixed. If input shapes change frequently or the model structure is regularly modified, repeated compilation may be required. The system may also fall back to operator-by-operator execution, while first-request latency can increase.

    Measuring Effective Throughput Under SLO Constraints

    Testing should begin by fixing the SLO threshold, followed by load testing with a realistic request distribution. During the test, record total throughput, P99 latency, and rate-limiting behavior. Throughput numbers are comparable only when P99 latency remains within the threshold and no rate limiting is triggered.

    In this experiment, the 53.5% improvement was the maximum increase observed across multiple load levels. It does not represent the average improvement under every workload. In some high-pressure scenarios, the optimized configuration did not consistently lead when measured only by TPS. Under the SLO constraint, however, its effective throughput improvement was significant, which is the metric most relevant to production services.

    Each configuration should be tested multiple times, with both average results and variation ranges reported. This allows readers to determine whether the difference between the two configurations exceeds measurement error.

    Summary and Recommendations

    Optimization Dimension Technique Suitable Scenarios Risk
    Parallelism strategy Lower TP, increase DP, and enable expert parallelism MoE models and multi-accelerator deployments Benefits decline when expert distribution is uneven
    Communication optimization Sequence parallelism and communication-library tuning Long sequences and high-concurrency inference Adds cross-device communication; short sequences may become slower
    Compilation optimization Graph compilation and kernel fusion Operator-intensive models with stable structures Dynamic shapes or frequent structural changes may require fallback execution

    Teams deploying large models in heterogeneous or non-mainstream accelerator environments should consider three recommendations:

    1. Do not reuse the default parallelism configuration without testing. A higher TP value is not always better. The strategy should be selected through controlled comparisons that account for model structure, especially MoE routing, as well as the hardware communication topology.

    2. Capture tuning experience in deployment profiles. Configuration parameters, performance data, and conclusions from every experiment should be added to a standardized template. This creates a searchable and comparable knowledge base while reducing repeated work.

    3. Use SLO-constrained effective throughput as the decision metric. A higher raw throughput number does not necessarily indicate a better user experience. The baseline configuration should also be retained so that the system can be rolled back quickly if an optimization causes problems.