Memory Accounting and Cost Estimation for Local Deployment of Trillion-Parameter MoE LLMs
Deploying trillion-parameter Mixture of Experts (MoE) large language models locally presents significant challenges in VRAM capacity and interconnect bandwidth. This article analyzes why sparse activation in MoE architectures saves compute (FLOPs) but not memory, calculates the theoretical and practical VRAM requirements under 4-bit quantization, explains the critical need for 64+ accelerator supernodes to mitigate all-to-all communication bottlenecks, and provides a comprehensive cost estimation alongside viable cost-reduction strategies.
1. Understanding the Math: What 2.8 Trillion Parameters Mean
When a model’s total parameter count reaches the trillion scale (e.g., 2.8T), the first thing to understand is its architectural characteristics: such models universally adopt the Mixture of Experts (MoE) structure. Taking a typical configuration as an example, the model contains hundreds to nearly a thousand expert networks, and each token only activates about a dozen experts during inference, with an expert activation ratio typically around 2%.
A concept that is easily confused here needs clarification: the expert activation ratio is not equal to the parameter activation ratio. The expert activation ratio only describes “how many experts are selected by the router each time,” while whether the internal parameters of a single expert are fully involved in the computation and how the shared layers (like the attention module) account for the parameter volume will affect the actual parameter activation ratio. However, no matter how low the activation ratio is, it only affects compute consumption, not VRAM usage. When calculating the VRAM lower bound for MoE deployment, it must be estimated based on the total parameter count because the routing results during inference are unpredictable. All experts must reside in memory, and the inference engine calls out the selected experts in real-time based on the routing results.
In other words, “sparse activation” saves FLOPs, not VRAM. This is the fundamental reason why the local deployment cost of trillion-scale models remains high.
2. Quantized VRAM Lower Bound: From Theory to Engineering Practice
2.1 Theoretical Data Lower Bound
Assume the model has completed Quantization-Aware Training (QAT), with weights using a 4-bit floating-point format and activations using an 8-bit floating-point format. The theoretical storage lower limit for 2.8 trillion parameters is:
2.8T × 4 bit ÷ 8 = 1400 GB
This is merely the “bare data” lower limit; the actual requirement is much higher.
2.2 Detailed Calculation Based on OCP Specs
According to the Microscaling (MX) floating-point format specification defined by the Open Compute Project (OCP), every 32 4-bit elements must be accompanied by an 8-bit shared scale factor. This means the effective storage bit-width per weight is 4 + 8/32 = 4.25 bits. Recalculating:
2.8T × 4.25 bit ÷ 8 ≈ 1487.5 GB
The weights alone are already approaching 1.5TB, and this is not the entire picture.
2.3 Complete VRAM Composition
VRAM requirements for a production-grade deployment must include at least the following parts:
- Weight VRAM: Starting at approximately 1487.5 GB;
- Non-quantized Tensors: Embedding layers, output heads, LayerNorm parameters, and some high-precision buffers are typically kept in FP16/BF16, requiring an additional few tens to hundreds of GB;
- Runtime Workspace: Includes routing computations, all-to-all communication buffers, and temporary activation space required for expert calculations;
- KV Cache: This is the most easily underestimated part. In long-context scenarios, the KV Cache for each concurrent request grows linearly with sequence length. Beyond the hundreds of GB of weights, a substantial margin must be reserved for concurrency and context length;
- Alignment and Fragmentation: VRAM allocators, tensor alignment, and framework metadata all introduce extra overhead.
Comprehensively estimated, a full-fidelity deployment of this trillion-parameter model requires a VRAM range of 1.6TB to 2TB as a reasonable engineering expectation.
2.4 A Reference Point: Tens of Billions Parameter Models
For comparison, a dense/sparse hybrid model at the 670B scale requires about 685GB for weights under 8-bit floating point. Even compressed to 4-bit weights plus 8-bit activations, it still requires about 335GB for weights plus about 37GB for activations, totaling roughly 400GB, just to barely run on 8 accelerator cards with 80GB of VRAM each (640GB total). The scale of a trillion-parameter model is over 4 times larger, pushing the hardware lower bound for full-fidelity deployment to a completely different magnitude.
3. Why Supernodes are Needed: Communication is the Hidden Bottleneck
Official recommendations suggest using a supernode composed of 64 or more accelerators to deploy such models, because large-scale MoE inference is extremely sensitive to all-to-all communication bandwidth.
The specific process is: 896 experts are distributed across dozens or hundreds of cards. After each token passes through the routing layer, its activation values must be moved to the card where the target expert resides for computation, and then moved back for aggregation. This “send-compute-return” process occurs in every MoE layer during each forward pass. When experts are distributed across a large number of devices, communication latency directly eats up compute capacity—GPUs spend a vast amount of time waiting for data rather than computing, making actual throughput far below the hardware peak.
The value of a supernode lies in expanding the communication domain using NVLink or equivalent high-speed interconnects:
- Within a single communication domain: Inter-card bandwidth reaches the level of hundreds of GB/s, with latency as low as microseconds, keeping the routing transfer cost of experts manageable;
- Across communication domains: Only standard networks (like hundred-GB-level Ethernet/InfiniBand) can be used, and latency is more than an order of magnitude higher. Once MoE all-to-all communication crosses domains, performance drops off a cliff.
Therefore, deploying such models is not just about “gathering enough VRAM”; all experts must reside within the same high-speed interconnect communication domain.
4. Cost Estimation: The Real Bill
Calculated based on 64 cards, each with 80GB or more of VRAM:
| Item | Estimation |
|---|---|
| Accelerators (64-card supernode) | Market price per card ranges from tens of thousands to over a hundred thousand RMB; card costs alone are in the millions to nearly ten million RMB |
| Server chassis (8 cards/node × 8 nodes) | Including CPU, memory, storage, and intra-NVLink domain interconnect, roughly doubles the cost |
| Network & Datacenter | High-speed switches, optical modules, power supply (tens of kilowatts), and cooling |
| Total Investment | Starting at the level of tens of millions of RMB |
If a compromise is necessary, the following cost-reduction paths can be adopted:
- Cloud Rental: Billed per card-hour, a 64-card cluster costs thousands of RMB per hour. Suitable for validation and low-frequency usage, though long-term operating costs may actually be higher;
- Cloud Inference Services: Billed per token through general LLM inference services or intelligent programming tools, completely eliminating hardware investment;
- Degraded Deployment: Sacrificing context length, concurrency, or quantization precision. However, 4-bit is already near the balance point of precision and capacity, leaving limited room for further compression.
5. Conclusion
The local deployment of trillion-parameter MoE models is fundamentally a triple-threshold problem of “VRAM × Interconnect × Budget.” After 4-bit quantization, weights are about 1.5TB, and with runtime overhead, the actual requirement approaches 2TB. The distribution of experts dictates that a supernode with 64 or more cards, fully covered by high-speed interconnects, is mandatory. Factoring in hardware, networking, and datacenter investments, the self-build cost starts at the level of tens of millions of RMB. For the vast majority of teams, unless there are extreme data compliance or latency requirements, on-demand calling via cloud inference services is a more rational choice. Before making a deployment decision, it is recommended to conduct small-scale stress tests with your own real-world workloads to determine the boundary between self-building and renting.
