How to Calculate VRAM for Deploying a 2.8T MoE Model on 8 GPUs
Deploying large-scale Mixture of Experts (MoE) models requires rigorous VRAM planning. This article breaks down the VRAM calculations for deploying a 2.8T MoE model on an 8-GPU setup. It covers parameter sizing, precision impacts, parallelism strategies (Expert, Tensor, and Pipeline Parallelism), storage distribution, and provides a clear checklist to ensure your hardware can handle the load before deployment.
Conclusion first: With 1.56TB of weights, 8x 80GB GPUs (totaling 640GB) cannot fit the model; even 8x 192GB GPUs (totaling 1536GB) fall short without weight offloading or larger VRAM capacities. An 8-GPU deployment is only viable after confirming weight precision, per-GPU available VRAM, offloading strategies, and KV Cache margins.
1. Calculating Parameters vs. File Size
The VRAM estimation formula is straightforward: the number of parameters multiplied by the bytes per parameter.
- BF16 (2 bytes per param): 2.8T × 2 bytes ≈ 5.6TB
- FP8 (1 byte per param): 2.8T × 1 byte ≈ 2.8TB
- INT4 (0.5 bytes per param): 2.8T × 0.5 bytes ≈ 1.4TB
The released file is 1.56TB. Dividing 1.56TB by 2.8T parameters gives roughly 0.56 bytes per parameter (about 4.5 bits), indicating that the released weights are likely a mixed-precision or quantized version. The exact precision should be verified via the release page and configuration files, as this is the exact weight loaded during deployment.
Storage units in this article use decimal notation (1TB = 1000GB). GPU VRAM capacities marketed by vendors (e.g., 80GB, 192GB) also typically use decimal notation. Values in GiB will be slightly smaller; rely on the inference framework’s startup logs for actual available space.
Here are the key model parameters to differentiate:
| Metric | Value | Impact on Deployment |
|---|---|---|
| Total parameters | 2.8T | Determines weight file size and VRAM usage |
| Active parameters per token | ~104B | Determines single forward pass compute volume |
| Total routed experts | 896 | All experts must be quickly accessible |
| Selected routed experts per token | 16 | Determines the number of experts each token is sent to |
Compute volume is estimated based on ~100B parameters, but VRAM must account for all 2.8T parameters. Because the gating network can select any expert for a token, all 896 experts must reside in VRAM or fast-access memory.
2. Why 8x 80GB GPUs Are Not Enough
8x 80GB GPUs provide a total of 640GB VRAM. The 1.56TB weight file is about 2.4x this size, exceeding it by roughly 920GB. The weights alone cannot fit, let alone the KV Cache and activation values.
If weights are evenly distributed across 8 GPUs, each GPU must hold about 195GB. Even with 8x 192GB GPUs (totaling ~1536GB), the capacity is still about 24GB short of 1.56TB, averaging about 3GB short per GPU.
Therefore, the feasibility of an 8-GPU solution depends on three conditions: the actual loaded weight precision, per-GPU available VRAM, and whether weight offloading is permitted. Checking the release page, config.json, and quantization notes can confirm these points. If vendors do not provide this information, “starting with 8 GPUs” is merely an unverified claim. Offloading to CPU memory or local NVMe significantly degrades inference speed and is generally unsuitable for online serving.
3. VRAM Estimation Table
The following table estimates only the weights themselves, excluding KV Cache, activation values, communication buffers, and framework overhead. The “192GB” is the nominal capacity; actual available space will be smaller after accounting for system and framework usage.
| Weight Precision | Total Weight Size | Average Weight per GPU (8 GPUs) | Can 8x 192GB GPUs Fit Weights? |
|---|---|---|---|
| BF16 | ~5.6TB | ~700GB | No |
| FP8 | ~2.8TB | ~350GB | No |
| INT4 | ~1.4TB | ~175GB | Yes, but only ~17GB left per GPU |
| Released File | ~1.56TB | ~195GB | No, ~3GB short per GPU |
For the INT4 row, “Yes, but only ~17GB left per GPU” means the weights barely fit. Long contexts and high concurrency will continuously grow the KV Cache, and a 17GB margin is likely insufficient. Fitting the weights does not mean the service is ready for production.
4. Parallelism Strategies: Expert and Tensor Parallelism
There are three common parallelism methods, each with different communication patterns.
Expert Parallelism (EP) distributes the 896 experts across 8 GPUs, with each GPU handling about 112 experts. Each token is sent to the GPUs hosting its 16 selected routed experts, and the results are gathered after computation. This process relies on All-to-All communication.
The All-to-All communication volume can be roughly estimated as:Communication volume ≈ Number of tokens × top-k experts selected per token × hidden dimension × bytes per element × inter-GPU round-trip factor
The hidden dimension is defined in config.json, and the round-trip factor depends on the inference framework’s implementation. Communication volume scales synchronously with concurrent tokens, so inter-GPU interconnect bandwidth and topology (e.g., PCIe switches vs. NVLink) directly determine the throughput ceiling.
Tensor Parallelism (TP) splits a single weight matrix across multiple GPUs, performing an AllReduce after each layer’s computation. Non-expert parts, such as attention layers, typically use this method.
Pipeline Parallelism (PP) sequentially segments the 93 layers onto different devices (e.g., 11 to 12 layers per segment). It reduces per-GPU weight usage, but later segments must wait for earlier ones to complete. When mixed with EP and TP, requests must be split into multiple microbatches to prevent pipeline bubbles from dragging down throughput. More microbatches mean a lower bubble ratio, but single-batch latency and VRAM usage will increase accordingly.
In practice, hybrid approaches are common—for example, TP for attention layers and EP for expert layers. The specific partitioning scheme depends on the inference framework’s support. Expert load imbalance can also cause issues; if a “hot” expert is selected by a large number of tokens, its host GPU becomes a bottleneck while others sit idle. Post-deployment, you should monitor expert activation frequencies and per-GPU utilization.
5. Storage and Distribution: Managing the 1.56TB File
The Safetensors format supports memory mapping (mmap), so loading does not require reading the entire file into memory at once; required tensors can be read on demand. The file is split into 96 shards, which can be read in parallel, though parallelism is limited by disk and network bandwidth.
Consider the following for downloading and distribution:
- Verify free disk space before downloading. Reserve about 1.2x the file size for extraction and verification.
- Verify the hash for each shard to prevent file corruption from network interruptions. Hashes are usually provided on the release page or in index files.
- If using NVMe offloading, evaluate random read speeds. Weight loading is large-block sequential reading, whereas on-demand reads during inference may be small-block random reads—the performance difference is significant.
- For multi-node deployments, distribute from local shared storage or internal mirrors to prevent every machine from re-downloading from the public internet.
6. Pre-Deployment Checklist
Confirm each item before investing in hardware. Every item must have a clear answer:
- Weight precision: Determine whether
config.jsonor quantization notes specify BF16, FP8, INT4, or mixed precision. - Per-GPU available VRAM: Calculate the actual allocatable VRAM after deducting system, framework, and communication buffer usage.
- Offloading strategy: Determine if weight offloading to CPU memory or NVMe is allowed, and the permitted ratio.
- Inter-GPU interconnect: Ensure bandwidth and topology meet All-to-All communication requirements.
- KV Cache margin: Calculate the VRAM required for KV Cache at the target context length and concurrency level.
- Inference framework support: Verify if the framework supports EP, TP, PP, their hybrid modes, and the specific model architecture version.
- Startup validation: Perform a test run with the target context length and record the actual metrics.
