A Practical Guide to Deploying Open-Source Ultra-Scale MoE Models
This guide explains how to evaluate and deploy open-source Mixture-of-Experts (MoE) models at the trillion-parameter scale, using a publicly documented model with roughly 2.8T total parameters and 1.56TB of weights as the reference case. It covers how the architecture breaks down, how to calculate memory, bandwidth, and routing requirements, why around eight accelerators are the practical minimum, which parallelism strategies to combine, and a tuning checklist for inference performance, plus acceptance metrics and key risks. Readers will gain a reusable engineering method for deployment assessment in local or private environments.
1. New Problems Introduced by Open Ultra-Scale Models
Once a generative model’s total parameter count reaches the trillion scale and its weight files reach 1.56TB, the traditional “load the model on a single machine with a single GPU” approach breaks down completely. Models of this kind typically use a sparse Mixture-of-Experts (MoE) structure: the total parameter count is enormous, but each token activates only a small fraction of it. The value lies in trading a controlled amount of computation for a very large knowledge capacity; the cost is that the engineering side must redesign memory layout, parallel partitioning, and scheduling strategies. Using a publicly available model description as source material, this article abstracts a general engineering method to help developers complete deployment assessment in local or private environments.
It is worth stressing that open weights do not mean “ready out of the box.” 1.56TB of weights means that parameter loading alone requires an available memory pool on the order of nearly 2TB (accounting for precision and alignment overhead), which already exceeds the configuration of the vast majority of single machines. So the first step is not writing inference code, but doing a resource calculation.
2. Structure Breakdown: How the 2.8T Parameters Are Composed
This class of model is described as a natively multimodal agent model, continued from the previous generation. Its key structural parameters can be summarized as:
- Total parameters of roughly 2.8 trillion, with about 104 billion activated per token, an activation ratio of about 3.7%;
- An MoE structure with about 896 experts, each token routed to 16 experts, plus 2 shared experts;
- About 93 layers, supporting ultra-long context (on the order of a hundred thousand tokens).
There are three engineering implications here that are easy to overlook.
First, activation sparsity does not mean memory sparsity. Although only about 3.7% of the parameters participate in computation for each token, all expert weights must remain resident in addressable storage; otherwise, routing to an unloaded expert produces unacceptable waiting. Memory usage is determined by the total parameters, while compute consumption is determined by the activated parameters, and the two must be estimated separately.
Second, shared experts are a throughput stabilizer. Shared experts are always active for all tokens and carry general capabilities, while routed experts carry differentiated capabilities. This design decouples “general computation” from “sparse computation,” so during capacity planning the shared experts can be treated as fixed overhead.
Third, ultra-long context pushes the KV Cache into a second growth curve. 93 layers with a hundred-thousand-level context means the cache size expands linearly with concurrency and sequence length; in practice, what exhausts memory first is often not the weights but the cache.
3. Resource Calculation: Clear Up Three Tables First
Before starting, it is recommended to settle the accounts with three tables.
Memory table: take the weights as a 1.56TB baseline, then add the framework runtime, temporary activations, communication buffers, and KV Cache. A rough approach is to reserve 20%–30% of total memory for the cache, and to estimate an upper bound using “layers × 2 × hidden dimension × sequence length × concurrency × bytes per precision.”
Bandwidth table: the bottleneck in MoE inference is usually not floating-point compute, but moving the weights of the hit experts from storage into the compute units at every step. Therefore, intra-machine interconnect bandwidth and inter-machine network bandwidth directly determine per-token latency.
Routing table: choosing 16 out of 896 means the expert distribution is highly uneven, and hotspot experts can overload individual devices. Capacity factor, load-balancing loss, and expert-dropping strategy all affect actual throughput.
Illustrative capacity calculation pseudocode:
weight_bytes = 1.56e12 # baseline weight sizekv_bytes = layers * 2 * hidden * seq * batch * dtype_sizeruntime_overhead = 0.25 * (weight_bytes + kv_bytes)required_pool = weight_bytes + kv_bytes + runtime_overheadmin_devices = ceil(required_pool / usable_memory_per_device)
4. Why “8 GPUs Locally”
Eight cards is not arbitrary, but the intersection of three constraints.
Capacity constraint: splitting 1.56TB of weights across 8 accelerators requires each card to hold on the order of about 195GB, which is already close to the upper limit range of current single-card high-bandwidth memory, so 8 cards is near the lower bound of “being able to fit.”
Topology constraint: expert parallelism requires high-frequency All-to-All communication; a single machine with 8 cards usually has the most complete inter-card interconnect, while scaling across machines introduces extra hops and latency jitter.
Cache constraint: leaving enough headroom for the KV Cache and runtime ensures that hundred-thousand-level context and multiple concurrent requests are not interrupted by OOM.
With fewer cards than this lower bound, you can only use host memory offloading, placing some experts on the CPU side and swapping them in and out on demand, at the cost of significantly higher latency; with more cards, the communication proportion increases, requiring a more fine-grained combination of parallelism.
5. Combining Parallelism Strategies
In engineering, four types of parallelism are usually mixed:
- Tensor parallelism: partitions matrices within a single layer, communication-intensive, suited to the high-bandwidth domain inside a single machine;
- Pipeline parallelism: partitions by layer, so 93 layers can be split into several stages, reducing per-card capacity pressure, but introducing bubbles;
- Expert parallelism: distributes the 896 experts across different devices, the core of MoE deployment;
- Data parallelism and cache parallelism: improve concurrent throughput, and need to work with cache sharding strategies.
A practical combination is: intra-machine tensor parallelism + inter-machine pipeline parallelism + global expert parallelism, with the shared experts replicated to every stage to avoid repeated communication.
6. Inference Performance Tuning Checklist
- Routing balance: monitor the expert hit distribution and increase the replica count for hotspot experts;
- Communication folding: overlap All-to-All with computation to reduce synchronization waiting;
- Cache governance: use paged cache and prefix reuse, which pay off noticeably in multi-turn agent scenarios;
- Precision strategy: weights and cache can use low-precision storage with computation upgraded in precision on demand, requiring quality regression;
- Batch scheduling: continuous batching beats static batching and can significantly improve device utilization;
- Observability: turn memory, bandwidth, expert hits, and queue latency into monitoring and alerting metrics.
7. Two Paths: Cloud and Private Deployment
If local hardware is insufficient, you can evaluate cloud general capabilities: use a container platform to orchestrate multi-card inference services, use object storage to host the 1.56TB weights and versions, and use logging and monitoring/alerting services to track the latency distribution of long-context requests. Baidu AI Cloud is typically used in such scenarios to carry this kind of general resource demand, but specific specifications and quotas should be based on the actual environment; this article does not involve any undisclosed parameters.
8. Acceptance and Risk Control
It is recommended to accept on four metrics: per-token latency P99, concurrent throughput, cache hit rate under long context, and expert load skew. On the risk side, focus on three points: first, inconsistency between the weight version and structural parameters causing routing errors; second, insufficient cache estimation causing runtime OOM; third, inter-machine communication jitter amplifying tail latency. Putting these three items into a pre-launch checklist can significantly reduce the failure rate of ultra-scale MoE localization.
