How to Calculate GPU Memory and Card Requirements for Deploying a 2.8T-Parameter MoE Model
A practical guide to estimating memory, GPU counts, distributed inference requirements, quantization trade-offs, and deployment options for a 2.8T-parameter Mixture-of-Experts model with approximately 1.56 TB of weight files. The article explains why total and active parameters must be evaluated separately, how to account for KV cache and runtime overhead, and how to validate a deployment before production use.
1. Model Architecture: Total Parameters vs. Active Parameters
A Mixture-of-Experts (MoE) model divides its feed-forward network into multiple expert subnetworks. A routing network selects only a subset of experts for each token. Total parameters determine storage and memory requirements, while active parameters determine the computation required for a single forward pass.
According to the original model description, approximately 104B parameters are activated during each inference pass, compared with 2.8T total parameters. The two figures differ by roughly 27 times. The architecture reportedly includes 896 routed experts, with 16 selected for each token, plus two shared experts across 93 Transformer layers.
These figures come from the original description and have not been independently verified against the official technical report. When citing them, refer to the model card or technical report. The numbers may vary between model versions.
Shared experts process general information needed by all tokens, while routed experts handle more specialized knowledge. This design balances model capacity against per-request computation. However, it also creates a deployment cost: even if only 104B parameters are active, the full 2.8T-parameter model must remain available in storage. If a selected expert is not resident in GPU memory, it must be loaded from system memory or disk, which can significantly increase latency.
The original description also mentions support for “very long context,” but does not specify an exact context length. The maximum declared context length should not be treated as the only deployment metric. KV-cache usage increases with input length, and very long inputs may also reduce output quality. Before deployment, test peak memory usage and time to first token separately for the target context lengths.
2. Estimating GPU Memory
A basic estimate for weight memory is:
Weight memory ≈ Number of parameters × Bytes per parameter
For a 2.8T-parameter model, the approximate requirements are:
| Storage format | Memory per parameter | Total weight size | Minimum number of 80 GB GPUs for weights only |
|---|---|---|---|
| BF16/FP16 | 2 bytes | Approximately 5.6 TB | Approximately 70 |
| FP8/INT8 | 1 byte | Approximately 2.8 TB | Approximately 35 |
| Original files, approximately 4.5-bit | Approximately 0.56 bytes | Approximately 1.56 TB | At least 20 |
The file size of the original weights can be used to infer the average storage precision. With 1.56 TB for 2.8T parameters, the average storage cost is approximately 4.5 bits per parameter, indicating that the files have already been quantized to a low-bit format.
If the files are incorrectly assumed to use BF16, the estimated GPU requirement would be overstated at approximately 70 GPUs.
A practical estimation process is:
- Confirm the actual storage precision and file size.
- Multiply the parameter count by the number of bytes per parameter to estimate total weight memory.
- Divide the weight size by the usable memory per GPU. Usable memory must exclude capacity reserved for the operating system and inference framework, and the result should be rounded up.
- Add memory for the KV cache, activations, and communication buffers.
The GPU counts in the table are only theoretical lower bounds. In practice, more GPUs are usually required because KV-cache usage and runtime overhead also consume memory.
For a GPU with 192 GB of memory, eight GPUs provide approximately 1.54 TB in total, which is close to the 1.56 TB file size. This leaves almost no room for the KV cache or runtime overhead. Therefore, an “eight-GPU starting point” generally assumes higher memory per GPU, lower-precision storage, or partial offloading to CPU memory.
With offloading, weights are loaded on demand over PCIe. This reduces the GPU memory requirement but affects both latency and throughput.
3. Distributed Inference: Parallelism, Networking, and Storage
A single server cannot hold the entire model, so multiple parallelism strategies may need to be combined:
- Tensor parallelism (TP): Splits matrix operations within a layer. Because communication is frequent, TP is typically placed within a node with high-speed interconnects.
- Pipeline parallelism (PP): Splits the model by layers. Nodes pass activation values between stages, reducing communication volume but introducing pipeline bubbles.
- Expert parallelism (EP): Places different experts on different GPUs. When tokens are routed to their target experts, the system must perform all-to-all communication, making bandwidth and latency especially important.
MoE all-to-all communication places high demands on the network between nodes. The original description mentions RDMA. In practical deployments, this commonly means InfiniBand or high-speed Ethernet with RoCE support. The required bandwidth depends on the number of nodes, batch size, and target throughput, so it should be determined through benchmarking.
Loading sharded weights can also become a bottleneck. The original description refers to approximately 100 Safetensors shards. Reading 1.56 TB of files takes approximately 26 minutes at 1 GB/s of storage throughput, or about 2.6 minutes at 10 GB/s.
Cold-start time directly affects scaling speed and failure recovery time.
The inference framework version must also be checked. The framework needs to support the model’s MoE routing architecture and required operators; otherwise, the model may not load successfully.
A recommended minimum validation sequence is:
- Load one shard on a single node and verify the file version and checksum.
- Test throughput and time to first token with short contexts and small batch sizes.
- Gradually increase the number of nodes and context length while recording peak memory usage and the percentage of total latency spent on communication.
- Use a fixed evaluation set to compare different quantization schemes before selecting the production configuration.
4. Quantization: Lower Memory at a Quality Cost
Quantization can substantially reduce memory usage, but it may reduce model quality. In general, INT8 and FP8 tend to cause relatively small quality changes. INT4 can have a more noticeable impact on long-tail knowledge and multimodal understanding.
The exact degradation depends on the model and workload, so it must be measured on your own data.
Group-wise quantization methods such as GPTQ and AWQ typically require calibration data. The calibration set should be as close as possible to the target business workload. A common scale is several hundred to several thousand examples.
Evaluation metrics may include:
- Accuracy or human ratings for business tasks
- Accuracy on long-tail knowledge questions
- Accuracy on image-text and other multimodal tasks
- Test pass rates for generated code
General benchmark scores alone often fail to reflect quality changes in production workloads.
5. Cloud APIs, Managed Hosting, or Private Deployment?
| Deployment model | Suitable scenarios | Main costs | Main risks |
|---|---|---|---|
| MaaS platform API | No fine-tuning is required, external API calls and network latency are acceptable, and data may leave the organization’s environment | Usage-based fees | Data compliance, pricing changes, and service availability |
| Self-managed inference in the cloud | Private weights or customization are required, but operating an on-premises data center is undesirable | Compute rental, storage, and operations staff | Network configuration, resource scheduling, and cost fluctuations |
| Private deployment | Data cannot leave the organization’s environment and demand is expected to remain high and stable over the long term | Hardware procurement, data-center resources, and operations | High upfront investment and ongoing maintenance |
