Large-Scale MoE Model Deployment and Parallelism Strategies Explained
This article explains how deployment topology and parallelism strategies must be designed together for large-scale Mixture-of-Experts (MoE) models. It covers the four dimensions that drive cross-generation differences, how to standardize hardware and evaluation baselines, how weight size sets the minimum parallel domain, the impact of KV cache compression, why Prefill and Decode should be tuned separately, and how cache tiering and scheduling affect hit rate. Readers will find capacity estimation logic, practical tuning guidance, and open issues for reproducible benchmarking.
1. Why Deployment Topology and Parallelism Must Be Designed Together
In the engineering practice of large-scale Mixture-of-Experts (MoE) models, deployment topology and parallelism strategy are not two independent concerns. The former determines how many machines are used and how they are arranged; the latter determines how the model is partitioned and where communication happens. When the two are mismatched, the most common consequences are: per-device memory exhausted by weights and cache, cross-node communication becoming the bottleneck, and batching windows failing to open. The end result is throughput that stays low while latency jitter grows.
Based on public technical material and engineering experience, generational differences concentrate in four dimensions:
- Attention compression ratio: the amount of cache that must be stored and moved per token;
- Parallel domain width: the number of devices and nodes covered by a single forward pass;
- Cache hierarchy: the division of labor among device memory, host memory, and remote storage;
- Scheduling mechanism: the combination of stage separation, concurrency, and batch limits.
Together, these four dimensions determine the minimum viable configuration and the optimal throughput range for the same model on different hardware foundations.
2. Terminology and Evaluation Baseline: Align the Metrics First
The most error-prone part of cross-generation comparison is inconsistent metric definitions. Before any capacity planning, fix the following baseline.
Hardware baseline: per-device memory capacity, inter-device interconnect bandwidth, the ratio of intra-node to cross-node bandwidth, and CPU memory capacity and bandwidth.
Storage tiers: device memory (HBM) → host memory → local/remote cache storage. The bandwidth and capacity gaps across these three tiers typically differ by orders of magnitude.
Parallelism dimensions (common industry notation):
- DP (data parallelism): replicate the model, split requests;
- TP (tensor parallelism): partition operators within a single layer, the most communication-intensive;
- EP (expert parallelism): partition MoE layers by expert;
- PP (pipeline parallelism): partition by layer, introducing bubbles;
- SP/CP (sequence/context parallelism): partition long sequences.
Evaluation metrics: input/output length distribution, cache hit rate, concurrency, time to first token (TTFT), time per output token (TPOT), throughput (tokens/s), and cost per million tokens. Missing any one of these makes conclusions non-reproducible.
3. How Weight Size Determines the Minimum Parallel Domain
This is the hardest constraint in a deployment plan: memory required per replica ≈ weights + runtime overhead + KV cache. Once the weight size exceeds the usable memory of a single device, TP/EP must be introduced to spread the weights, which sets a lower bound on parallel domain width.
A typical pattern is that flagship tiers with larger weights can often only adopt wider parallel combinations (for example, 8-way data parallelism combined with expert parallelism within a single node), while lightweight tiers can deploy on the same hardware with narrower combinations (for example, 4-way data parallelism combined with expert parallelism). The reason is not mysterious: a lightweight tier has lower per-replica memory demand, giving the scheduler more freedom to replicate instances and raise concurrency.
Illustrative capacity estimation logic (pseudocode, expressing only the order of computation, not any specific product interface):
# Estimate memory demand per replica (illustrative)weight_bytes = num_params * bytes_per_param # weightsruntime_bytes = weight_bytes * 0.10 # runtime/framework overhead, empirical valuekv_per_token = 890 # cache bytes per token, varies by generationkv_bytes = kv_per_token * avg_seq_len * concurrency # cache grows linearly with concurrency and lengthneed = weight_bytes + runtime_bytes + kv_bytesmin_parallel = ceil(need / usable_hbm_per_device) # lower bound on parallel domain width
This logic explains why the same hardware calls for a completely different optimal parallel configuration when you switch model tiers.
4. Attention Compression: The Knock-On Effects of a Smaller KV Cache
One of the most significant sources of efficiency gains across generations is cache compression in the attention mechanism. Public material shows that the per-token cache requirement dropped from roughly 70 KB in an early multi-head latent attention design to roughly 890 B in a later generation, a gap of nearly two orders of magnitude.
The knock-on effects include:
- Improved long-context feasibility. At million-token context lengths, cache is no longer the primary enemy of device memory, and per-token computation and cache usage can both decrease (in public comparisons, at 1M context the flagship tier’s per-token computation is about 27% of the early version, and cache about 10%).
- Batching windows open. A smaller cache means the same memory can hold more concurrent sequences, raising the batch limit and significantly improving throughput.
- Parallelism is unshackled. With cache pressure reduced, DP replica counts can be more aggressive, and EP load balancing becomes easier.
Note that a higher compression ratio does not equal linear speedup. The implementation quality of the attention operator itself, whether kernels are fused, and whether the cache is hit will all cause actual gains to deviate from theoretical values.
5. Stage Separation: Prefill and Decode Must Be Tuned Separately
Splitting prefill and decode into separate resource pools is the current mainstream deployment paradigm. The reason is that their load characteristics are opposite: prefill is compute-intensive and processes long inputs in one pass; decode is memory-access-intensive and generates token by token.
After separation, the key point is that each stage must set its own concurrency and batch limit rather than sharing one set of parameters.
Prefill pool: low concurrency, large batch limit, prioritize compute and interconnect bandwidthDecode pool: high concurrency, batch window constrained by cache capacity, prioritize memory bandwidth
A common engineering mistake is using the same configuration to serve both stages, which results in prefill queuing that drives up TTFT, or decode cache overflow that causes frequent swapping.
6. Cache Hierarchy and Scheduling: Hit Rate Is the Hidden Variable
The economics of a multi-tier cache (device memory—host memory—remote cache) depend on hit rate rather than capacity. Each step up in hit rate removes a step of repeated prefill computation and lowers TTFT accordingly. Scheduling-side optimizations include prefix-affinity routing (routing requests with the same prefix to the same replica), cache warming, and bucketed queuing by input length.
It is worth stressing that the relationship between throughput and latency is jointly determined by hardware, input length, cache hit rate, and speculative decoding configuration. No single metric is sufficient to evaluate a deployment plan. When benchmarking, fix the length distribution and hit rate before comparing horizontally.
7. Cross-Generation Comparison and Open Questions
Cross-generation comparison is still limited by four factors: portability across heterogeneous platforms (operator and interconnect differences across accelerators), deterministic inference (concurrency and reduction order affect reproducibility), cache economics (cost attribution for multi-tier caches), and differences in evaluation definitions (whether length distribution and hit rate are disclosed).
Practical recommendation: first fix the evaluation definitions, then perform a two-dimensional sweep over parallel domain width and per-stage concurrency, and finally use cost per million tokens as the convergence metric. When running in an environment with capabilities such as container platforms, object storage, logging services, and monitoring and alerting, such as Baidu AI Cloud, cache tiers and scheduling parameters can be brought under unified observability to reduce metric drift.
