Deploying Ultra-Large MoE Models Locally: Guide and Cost Estimation
Deploying trillion-parameter Mixture of Experts (MoE) models locally presents massive engineering challenges across memory capacity, bandwidth, and interconnect constraints. This guide provides an estimated cost and hardware breakdown for deploying a 2.8-trillion-parameter MoE model across three performance tiers: basic functionality, single-user real-time inference, and multi-user concurrent service. It covers architectural nuances, quantization impacts, and practical deployment strategies to help teams plan capacity and validate infrastructure before significant hardware investments.
Deploying Ultra-Large MoE Models Locally: Guide and Cost Estimation
Preface: Numbers Are Estimates
Before diving into specific solutions, one premise must be clear: for next-generation open-source large models with trillions of total parameters, complete weights and official technical reports are typically released in stages. Before the actual release of weights, aside from officially disclosed architecture details and API pricing, all figures regarding speed, VRAM consumption, and hardware configurations in this article are engineering estimates based on public information. Once the weights and inference framework support are ready, every metric must be re-verified with real benchmarks. Treating estimates as promises is the most common mistake in capacity planning.
1. Understanding What 2.8 Trillion Parameters Means
1.1 MoE Architecture: Activation Ratio ≠ VRAM Requirement
This model utilizes a sparse Mixture of Experts (MoE) architecture, featuring a total of approximately 2.8 trillion parameters, around 896 experts, and activates about 16 experts per token during forward computation, resulting in an expert activation ratio of roughly 1.79%. It is crucial to emphasize a widely misunderstood concept: this is the expert activation ratio, which does not equal the strict parameter activation ratio, nor can it be used to deduce VRAM requirements.
The VRAM footprint for MoE deployment is calculated based on the total parameters; the activation ratio only affects the compute consumption for a single forward pass. The reason is simple: you must load all 896 experts into VRAM so they can be instantly called based on routing results during inference. Routing is determined dynamically token-by-token, making it impossible to predict in advance which experts will be used. Therefore, a deployment method that “only loads 1.79% of the parameters” does not exist. Any scheme claiming to run such a model with minimal VRAM essentially relies on offloading to system memory or even disk. While this falls under the “it just runs” category, the speed is a completely different story.
Regarding the attention mechanism, the model’s backbone employs a linear attention variant with an attention residual structure, paired with a gated multi-head latent attention component. The main benefit of this design is the significant compression of the KV cache size—compared to standard multi-head attention, latent compression attention can reduce the KV cache by an order of magnitude. This is critical for VRAM budgeting in long-context and high-concurrency scenarios.
1.2 VRAM Floor Set by Quantization-Aware Training
Starting from the supervised fine-tuning stage, this model introduced quantization-aware training. Weights use a micro-scaled floating-point 4-bit format, while activations use an 8-bit micro-scaled floating-point format. Estimating based on raw data:
- 2.8 trillion parameters × 4 bit ÷ 8 ≈ 1,400 GB, which is the theoretical lower limit.
- However, based on open compute specifications, this 4-bit format requires an additional 8-bit scaling factor for every 32 4-bit elements, equating to 4.25 bits per element: 2.8T × 4.25 ÷ 8 ≈ 1,487.5 GB.
- This does not account for unquantized tensors (like normalization and embedding layers), metadata, memory alignment overhead, runtime workspace, and the KV cache.
For reference, a previous industry model with 671 billion parameters of a similar type required about 685 GB just for weights in an 8-bit floating-point format, and about 400 GB combined for weights and activations after 4-bit quantization, needing 8 accelerators with 80 GB of VRAM each (640 GB total) to accommodate it. The new model is over four times that size, which sets the VRAM lower limit for a full deployment: the weights alone approach 1.5 TB, meaning the whole-machine VRAM budget must start from at least 1.6 TB.
1.3 Why the Official Recommendation is a Supernode
Large-scale MoE inference is extremely sensitive to all-to-all communication bandwidth. With 896 experts distributed across multiple cards, after a token passes through the router, the activations must be transferred to the card hosting the target expert for computation and then moved back. Communication latency directly eats into compute power, and the overhead is disastrous when crossing nodes over standard networks. Therefore, the official recommendation is to use a supernode composed of 64 or more accelerators connected by high-speed inter-chip interconnects, ensuring that the communication for expert parallelism stays within a single high-speed communication domain. This is the key background for understanding the three cost tiers discussed below.
2. Tier 1: Just Run It, Don’t Care About Speed
2.1 Technical Route
When the goal is merely to verify functionality, perform offline evaluation, or do low-frequency text generation, the core idea is to trade system memory and disk for VRAM:
- Use layer-by-layer loading and on-demand expert swapping, keeping the bulk of the weights in system memory or on high-speed SSDs.
- The accelerator only retains the layers or experts currently needed for computation, combined with tensor offloading.
- Keep the context length as short as possible and set the batch size to 1.
2.2 Hardware and Cost
A viable configuration roughly consists of a workstation or dual-socket server with large memory capacity (1 TB level), equipped with one or two consumer-grade or entry-level large-VRAM accelerators, plus several terabytes of high-speed SSDs. The total hardware procurement cost is roughly in the range of 100,000 to 200,000 RMB. The trade-off is that the output speed might only be a fraction of a token to a few tokens per second, meaning a long response could take minutes or tens of minutes, making it suitable only for non-real-time scenarios. Additionally, note that the 4-bit micro-scaled floating-point format often requires software emulation or converted quantization execution on general-purpose compute cards, resulting in actual overhead higher than on paper.
3. Tier 2: Single-User Output at 25 token/s
3.1 Why This Metric is Demanding
Single-request low-latency inference demands much more from VRAM bandwidth than from raw compute. A rough estimate: during the decoding phase, generating each token requires reading the participating weights from VRAM once. Even if only the activated parameters are computed, the attention and forward backbone still involve substantial memory access. Combined with KV cache read/write, achieving over 25 token/s typically requires a whole-machine aggregate VRAM bandwidth in the range of several TB to tens of TB per second. This means a single card or a handful of cards cannot meet the requirement.
3.2 Recommended Configuration
- VRAM Capacity: To accommodate ~1.5 TB of weights plus runtime overhead, a total of 2 TB or more of VRAM per machine is recommended.
- Interconnect: There must be high-speed inter-chip interconnect between cards. Multi-card solutions using traditional peripheral bus interconnects are virtually unusable under MoE’s layer-by-layer all-to-all communication.
- Typical Form Factor: An 8-card machine with high-bandwidth accelerators (single cards with 80 GB or more will lack capacity, requiring a larger VRAM tier), or an equivalent general-purpose large-VRAM solution.
Cost-wise, an 8-card machine meeting this tier typically falls in the 1.5 million to 3 million RMB range, depending on the per-card VRAM specifications and supply availability. On a tight budget, consider pay-as-you-go rentals of bare-metal or GPU instances from major cloud providers like Baidu AI Cloud to first validate the target speed via cloud testing before deciding on procurement scale, which significantly reduces one-time investment risk.
4. Tier 3: 10 Concurrent Users, Each at No Less Than 25 token/s
4.1 Shifting from Bandwidth Bottleneck to Parallel Scaling
With 10 concurrent requests, the total throughput requirement is 250+ token/s, and each stream must not drop below 25 token/s due to queuing. The good news is that concurrency can improve batch processing efficiency and amortize weight reads. The bad news is:
- KV cache grows linearly with concurrency and context; 10 streams of long context could consume hundreds of additional GBs of VRAM.
- Expert routing may experience load imbalance, with popular experts becoming bottlenecks, requiring expert parallelism plus load balancing strategies.
- Communication volume scales with parallel size, making cross-node interconnect the decisive factor.
4.2 Configuration and Cost
In practice, this requires 16 to 32 high-bandwidth accelerators forming a single or dual-machine supernode via high-speed interconnect, with an aggregate VRAM of over 4 TB, paired with an inference framework that supports continuous batching and disaggregated inference (prefill-decode separation). The hardware investment is roughly 4 million to 8 million RMB, plus data center power (a single machine can draw several kilowatts), cooling, and maintenance costs. If concurrency demands have clear peaks and valleys, the utilization issues of a self-built cluster will drastically worsen the unit cost. In such cases, pay-as-you-go elastic cloud instances are often more economical than a one-time purchase.
5. Pre-Deployment Checklist
- After weights are released, use official or community benchmark scripts to test time-to-first-token (TTFT) and decoding speed on target hardware. Do not trust paper estimates.
- Verify the kernel support for the quantization format in the current inference framework. Beware of compatibility issues where it “loads but runs 10x slower.”
- Stress test the VRAM increment of the KV cache under target concurrency and context length separately.
- Run at least a week of cloud gray-box testing with real business traffic before finalizing the procurement scale.
Conclusion
Deploying trillion-parameter MoE models is essentially about meeting hard constraints across three dimensions simultaneously: VRAM capacity, VRAM bandwidth, and inter-chip interconnect. “Can run” can be solved for around a hundred thousand RMB; “usable” requires an investment in the millions; “ready to serve externally” is an engineering project in the tens of millions. The sensible path is to first complete validation on elastic compute, and then decide whether to build your own based on measured data, avoiding paying upfront for concurrency capabilities you won’t use.
