Deploying a 2.8T MoE Model Locally: How to Calculate VRAM and Node Requirements

    This article explains the key numbers behind deploying a 2.8T-parameter Mixture-of-Experts model locally, including the difference between the 1.56TB of open-source weights and 2.8T total parameters, the sparse activation architecture, and step-by-step VRAM estimates for different quantization levels. It covers why 104B activated parameters don't mean low memory requirements, how to size KV Cache and node counts, quantization trade-offs, parallelism constraints, common deployment errors, and when self-hosting makes more economic sense than calling a cloud API.

    Deploying a 2.8T MoE Model Locally: How to Calculate VRAM and Node Requirements

    1. First, Distinguish 1.56TB from 2.8T

    The open-source weight files total roughly 1.56TB, while the model has 2.8T total parameters. These two numbers can’t be converted directly, because file size depends on how many bits each parameter occupies.

    Dividing 1.56TB by 2.8T parameters gives about 4.5 bits per parameter on average (roughly 4.9 bits if using 1TB = 2^40 bytes). FP8 uses 8 bits and BF16 uses 16 bits, so these weights almost certainly use mixed precision — some layers or experts at higher precision, others at lower bit widths. The exact precision distribution should be verified against the official model card or quantization notes before deployment.

    2. Architecture: 2.8T Parameters, ~104B Activated per Token

    1. How Sparse Activation Works

    The model uses a Mixture-of-Experts (MoE) architecture. The traditional Transformer feed-forward network (FFN) layers are replaced by multiple parallel expert networks, and a router selects a small number of experts for each token.

    The published configuration is as follows (check the official config files for the exact version):

    • 896 total experts, with each token routed to 16 experts;
    • 2 shared experts that participate for all tokens;
    • 93 layers, supporting roughly 100K-level context;
    • About 104B parameters activated per token.

    A simplified sketch of the routing logic:

    1. # Simplified MoE routing logic
    2. gate_scores = router(x) # [batch, seq, num_experts]
    3. topk_experts = topk(gate_scores, k=16) # select 16 experts per token
    4. expert_output = sum(experts[i](x) * w_i
    5. for i, w_i in topk_experts)
    6. shared_output = shared_expert(x) # shared experts always compute
    7. output = expert_output + shared_output

    2. Fewer Activated Parameters Doesn’t Mean Less VRAM

    Activated parameters determine the compute per token (FLOPs), which affects speed and compute requirements. VRAM, however, must hold all parameters. The router may call any expert at any position, so the weights of all 896 experts must be accessible at all times — either fully resident in VRAM, or offloaded to CPU memory or NVMe and swapped in on demand.

    Therefore, the claim that “only 104B is activated, so one high-end GPU can run it” does not hold.

    3. Fine-Grained Experts and Shared Experts

    896 fine-grained experts combined with 16 experts per token allow knowledge to be expressed through more combinations, improving parameter utilization. Shared experts handle high-frequency, general patterns, reducing redundant learning of basic capabilities across experts and helping alleviate load imbalance between experts.

    3. Hardware Estimation for Local Deployment

    1. The Weight VRAM Formula

    Weight VRAM ≈ total parameters × bytes per parameter

    Precision Bytes per parameter 2.8T weight size Minimum number of 8-GPU nodes for weights only (80GB per GPU, 640GB per node)
    BF16 2 ~5.6TB 9 nodes (5.6 ÷ 0.64 ≈ 8.75, rounded up)
    FP8 1 ~2.8TB 5 nodes (4.375, rounded up)
    INT4 0.5 ~1.4TB 3 nodes (2.19, rounded up)

    The official 1.56TB release, calculated by weight size, likewise requires at least 3 eight-GPU nodes.

    2. Node Count and KV Cache Headroom

    Beyond weights, you need KV Cache, activations, and runtime overhead. Reserving 15% on top of weight size, the INT4 version needs about 1.6TB. Three 8-GPU nodes provide 1.92TB total, leaving only ~0.3TB of headroom — too tight, and long-context or high-concurrency workloads will likely trigger OOM. For practical planning, at least 4 nodes (32 × 80GB GPUs) is recommended.

    3. Can a Single 8-GPU Node Rely on CPU Memory?

    If a single 8-GPU node holds the hot experts while cold experts sit in CPU memory, the required capacity is about 1.56TB − 0.64TB ≈ 0.92TB. You would need at least ~1TB of CPU memory to hold those weights; 512GB is not enough. If you rely on NVMe tiering instead, the read latency from expert swapping will hurt throughput, making it suitable only for low-concurrency, latency-insensitive offline workloads.

    On storage: after downloading the 1.56TB of weights, format conversion generates additional files. Converting to FP8 alone produces ~2.8TB of output, so disk capacity should be sized according to your target format.

    4. KV Cache Estimation

    KV Cache bytes = 2 × layers × KV heads × head dimension × context length × concurrency × bytes per element

    The original source doesn’t specify KV head count or head dimension, so here’s a demonstration with assumptions: 93 layers, 8 KV heads, head dimension 128, BF16 storage. A single token occupies about 2 × 93 × 8 × 128 × 2 ≈ 0.38MB, so a single request at 100K context needs roughly 38GB, and 4 concurrent requests need about 152GB. If the model uses compressed attention, actual values will be significantly smaller — always verify against the model’s config files.

    4. Quantization and Inference Deployment

    1. Choosing a Quantization Level

    INT4 offers the smallest footprint but carries a higher risk of accuracy loss, especially on long-context retrieval, math reasoning, and coding tasks. FP8 typically loses less accuracy but requires twice the VRAM of INT4. Before deploying, benchmark accuracy against your own evaluation set — don’t rely solely on generic leaderboards.

    2. Parallelism Constraints

    • Expert parallelism (EP) must divide 896 evenly — e.g., 8, 16, 32, 56, or 64 — so experts are distributed uniformly. With EP=32, each GPU carries about 28 experts.
    • Tensor parallelism (TP) must divide the number of attention heads evenly; check the model config for the exact value.
    • All-to-all communication between nodes is frequent, so high-bandwidth interconnects are essential. Relying on ordinary Ethernet alone will throttle overall throughput.

    3. Deployment Steps

    1. Download the weights and verify the hash of each shard; re-download immediately if any shard is missing or corrupted.
    2. Confirm what the license permits before performing format conversion.
    3. Configure TP and EP according to your node count, and get the service running with short contexts first.
    4. Gradually increase context length and concurrency while recording peak VRAM usage.
    5. Load-test and record metrics: time to first token (TTFT), time per output token (TPOT), overall throughput (tokens/s), peak VRAM, and long-context request success rate.
    6. Keep the previous version’s weights and configuration so you can roll back if problems arise.

    Exact startup parameter names vary by inference engine — always refer to the official documentation of your chosen engine.

    4. Common Mistakes

    • OOM on startup: estimated based on weights only, without reserving space for KV Cache and activations.
    • Long-context failures: KV Cache wasn’t calculated based on the maximum context length.
    • Very low throughput: experts are scattered across GPUs for single requests, leaving GPUs underutilized; high-concurrency batching is needed for efficiency.
    • Degraded output quality: the quantization format doesn’t match the inference engine’s capabilities, or quantization error is being amplified — compare against an unquantized baseline.
    • Loading failures: missing shards or hash mismatches.

    5. Self-Hosting vs. Calling a Cloud API

    Self-hosting means bearing the costs of hardware purchase or rental, power, cooling, data center space, operations staff, and failures. Cloud services bill by token, with low upfront investment. Start by comparing two numbers:

    • Monthly self-hosting cost: hardware depreciation or rental + power and cooling + allocated ops staffing;
    • Monthly cloud cost: monthly token usage × unit price.

    Self-hosting only makes economic sense when the cloud cost is persistently higher than the self-hosting cost, and GPU utilization can be sustained at a high level.

    Consider these questions when deciding:

    • Does your data have to stay on-premises due to corporate or regulatory constraints? If so, prioritize private deployment.
    • Is request volume stable and high? Only stable workloads can amortize hardware costs.
    • Does your team have dedicated GPU cluster operations expertise? If not, prefer the cloud.
    • Do you need to switch model versions quickly? Cloud services typically update faster.

    During validation or transition periods, major cloud providers’ LLM inference services and dedicated compute offerings are viable options.

    6. Licensing and Risk Reminders

    • Licensing: open-weight licenses may restrict commercial use, redistribution, or require attribution. Read the original license terms before deploying — don’t assume it’s permissive.
    • Data security: weights and inference logs may contain sensitive information; manage logs and caches according to your data classification policy.
    • VRAM planning: estimates are only a lower bound — real deployments must be validated with actual measurements.
    • Operational cost: multi-node clusters require ongoing investment in failure recovery, driver versions, and communication library upgrades.

    7. Conclusion

    With 2.8T parameters, 896 experts, and ~104B activated per token, this configuration represents the open-source community’s exploration of sparsity. The key to deployment is getting the VRAM math right: INT4 weights come to about 1.4TB, requiring at least 3 eight-GPU nodes — 4 or more in practice — with CPU memory and NVMe sized according to the volume of cold experts.

    The advice for developers: first confirm whether your business genuinely needs this scale of capability, then compare the total cost of self-hosting versus the cloud, and validate quantized performance against your own evaluation set. Technical feasibility is only the first step — license compliance, accuracy validation, and long-term operations determine whether the project lands sustainably.