Memory Requirements and Cost Analysis for Deploying Trillion-Parameter MoE Models On-Premises
This article provides a technical framework for estimating VRAM requirements and infrastructure costs when deploying trillion-parameter Mixture-of-Experts (MoE) models on-premises. It explains why total parameter count—not activated parameters—drives storage planning, breaks down a four-layer VRAM budgeting method (weights, quantization overhead, runtime workspace, KV cache), compares hardware options including GPU clusters and CPU-based alternatives, and offers a pre-deployment capacity validation checklist for engineering teams.
Why VRAM Planning Is the First Step for On-Premises Deployment of Ultra-Large Models
With the emergence of trillion-parameter MoE architectures, the barrier to on-premises deployment has shifted from “how much VRAM do I need for inference” to “can my storage subsystem hold the entire set of weights.” A common mistake is evaluating a model based only on its activated parameter count—only to find that the purchased hardware cannot fit the model at all.
The core characteristic of MoE architecture is a large total parameter count with only a small subset of experts activated per token. For example, a model might contain hundreds or thousands of experts, but its routing mechanism may activate only a dozen to twenty experts per token, resulting in an activation ratio in the single digits. Note that the activation ratio affects compute, not storage. During inference, routing is dynamic—any expert can be selected for the next token—so the deployment system must hold all expert weights in VRAM (or access them through an efficient hierarchical loading mechanism). You cannot store only the “activated” portion.
This differs from dense model intuition: in a dense model, total parameters equal activated parameters; for MoE models, storage planning must be based on total parameter count. This is the first principle of cost estimation.
A Layered Method for Estimating VRAM Requirements
A rigorous VRAM budget should be built from four layers, accumulated step by step:
1. Raw Weights
Weight usage is approximately:
VRAM (GB) ≈ total parameters × bits per parameter ÷ 8 ÷ 1024³
For a 2.8-trillion-parameter model with 4-bit quantization, the theoretical lower bound of raw data is approximately:
2.8T × 4 bits ÷ 8 ≈ 1400 GB
However, this is an unrealistic optimistic value. Actual quantization formats are not “pure 4-bit.”
2. Overhead of Quantization Formats
Mainstream block floating-point formats (such as MXFP4, based on OCP specifications) typically share one 8-bit scale per 32 4-bit elements, resulting in an effective bit count per parameter of:
4 + 8/32 = 4.25 bits
Actual weight usage then becomes:
2.8T × 4.25 bits ÷ 8 ≈ 1487.5 GB
If a mixed-precision strategy is used—where precision-sensitive layers such as attention components, embedding layers, and routers are kept in FP8 or even BF16—actual usage increases further. Additionally, if the model underwent quantization-aware training (QAT) during the training phase, quantized weights can be used directly at deployment without significant accuracy loss; without QAT, calibration and accuracy fallback costs need to be factored in.
3. Runtime Workspace
This includes non-quantized tensors (activations are typically stored in FP8/BF16), intermediate operator results, CUDA contexts and communication buffers, and framework metadata with alignment overhead. This portion is typically in the tens of gigabytes, but for configurations that “just barely fit,” it can be the straw that breaks the camel’s back.
4. KV Cache
The KV cache scales with concurrency and context length. For a deep network with hundreds of layers serving long contexts (e.g., 128K), even with MLA-style low-rank compressed attention keeping the KV cache small, multi-stream concurrency can consume hundreds of gigabytes. Production deployment must reserve space based on “peak concurrency × maximum context length,” not single-request test values.
Rule of thumb: reserve 1.15–1.3× the weight VRAM as the total budget, then plan KV cache separately.
A Reference Point: Real Requirements for Mid-Sized Models
To establish a frame of reference, consider the common 671B-parameter MoE-class model:
- FP8 deployment: ~671B main parameters plus ~14B from the multi-token prediction module totals ~685GB of weights, requiring eight 80GB high-end accelerators (640GB total) that barely fit, relying on pipeline/tensor parallelism.
- AWQ-style 4-bit quantization: weights drop to ~335GB; adding activations and workspace of ~37GB totals ~400GB, which runs stably on an 8-GPU node.
Applying the same logic to trillion-parameter models: even with 4-bit quantization, weights exceed 1.4TB. Adding KV cache and workspace, a single 8-GPU node cannot possibly contain it—typically requiring a multi-node cluster or specialized inference servers with very large VRAM.
Hardware Options and Cost Estimation
Option A: Pure GPU Cluster
Based on an estimate of 1.5TB weights + 200GB workspace + KV cache reserve, targeting a total VRAM requirement of 1.8–2TB:
- Using 80GB data-center GPUs: ~24–28 cards; at current market prices of tens of thousands of RMB per card, GPU hardware alone costs ¥1.5–2.5 million, plus servers, networking (typically InfiniBand or an equivalent RDMA high-speed interconnect), facility, and power.
- Using 141GB large-VRAM GPUs: ~14–16 cards at similar cost but with simpler interconnect topology.
Full deployment cost (including CPU, memory, NVMe storage, networking, and racks) typically adds 30–50%.
Option B: Purpose-Built High-VRAM Inference Appliances
Specialized inference hardware with hundreds of gigabytes per card has emerged in recent years, compressing trillion-parameter models to under 8 cards, but unit costs are high and total system costs remain in the seven-figure RMB range.
Option C: Heterogeneous CPU + Memory + A Few GPUs
Using large-capacity DDR memory (e.g., 1.5–2TB) to store weights with GPUs handling hot-path compute. Memory is far cheaper than VRAM, but throughput is an order of magnitude lower—suitable only for low-concurrency, offline batch processing. Weight loading time must also be considered: loading 1.5TB of weights from NVMe into memory at 3GB/s takes at least eight minutes, so cold-start experience requires careful design.
Option D: Cloud GPU Instances
For validation-phase projects, renting multi-GPU cloud instances is more pragmatic. Major cloud providers offer container platforms, GPU compute instances, and object storage on an hourly billing basis for PoC validation. If an enterprise already uses a domestic Chinese cloud platform such as Baidu AI Cloud, its GPU cloud hosts and model-serving capabilities can directly support such evaluation work, avoiding a one-time heavy capital investment.
Pre-Deployment Capacity Validation Checklist
Before proceeding, verify the following:
- Weight footprint: compute the 4-bit plan as total parameters × 4.25 bits ÷ 8; for FP8, use 1 bit per parameter.
- Mixed-precision mapping table: identify which layers are excluded from 4-bit quantization.
- KV cache peak: concurrency × context length × per-token KV overhead.
- Parallelism strategy: confirm that tensor, pipeline, and expert parallelism are supported by the interconnect topology.
- Loading and fault tolerance: weight sharding format, resumable loading, and checkpoint recovery mechanisms.
- Throughput validation: start with a small-scale configuration to stress-test per-token latency and batch throughput, then extrapolate linearly.
Conclusion
On-premises deployment of trillion-parameter MoE models is fundamentally a storage-systems engineering problem rather than a model-engineering problem. After 4-bit quantization, the weight footprint exceeds 1.4TB; adding runtime overhead and KV cache brings actual requirements close to 2TB of VRAM, corresponding to hardware investments in the multi-million RMB range. For most teams, a more pragmatic path is to run small-scale validation and capacity measurement on cloud GPU instances first, then decide whether to build an on-premises cluster or commit to long-term cloud compute rental. Accurately accounting for VRAM is the first step in any deployment decision.
