Deploying a Trillion-Parameter MoE Model Locally: Calculating the Costs First

    Before downloading and deploying a trillion-parameter open-weight Mixture-of-Experts (MoE) model locally or on the cloud, it is crucial to calculate three key requirements: storage, VRAM, and licensing. Using a publicly disclosed 2.8T total parameter and 104B active parameter MoE model as an example, this article demonstrates the calculation process for storage footprint, GPU requirements, and quantization savings, while also providing a pre-deployment checklist and guidance on navigating open-weight licenses and choosing between local, cloud, or API solutions.

    If you are considering running a trillion-parameter open-weight model locally or in the cloud, your first step should not be downloading the model, but rather calculating three key requirements: storage footprint, VRAM capacity, and what the license allows you to do. This article uses a publicly disclosed MoE model with 2.8T total parameters and 104B active parameters as an example to demonstrate the calculation process step by step. The numbers used here are derived from original sources; for formal decision-making, always refer to the official model card.

    Distinguishing Total Parameters from Active Parameters

    Mixture-of-Experts (MoE) models split the neural network into multiple expert sub-networks. When processing each token, a router selects only a small subset of these experts to participate in the computation.

    This results in two distinct numbers with different implications:

    • Total parameters (2.8T) determine the size of the weight files and how much VRAM is needed to house them.
    • Active parameters (104B) determine the computational volume per token, directly affecting inference speed.

    Therefore, whether a model can fit into your hardware depends on the total parameters, while how fast it runs primarily depends on the active parameters. Confusing the two is the most common mistake in local deployment planning.

    Calculating Storage Footprint

    The formula for weight size is straightforward: the number of parameters multiplied by the number of bytes per parameter.

    • FP16 (2 bytes per parameter): 2.8T × 2 = 5.6TB
    • FP8 (1 byte per parameter): 2.8T × 1 = 2.8TB
    • INT4 (0.5 bytes per parameter): 2.8T × 0.5 = 1.4TB

    The original source cited a footprint of 1.56TB, which is slightly higher than the theoretical INT4 value. This usually indicates that certain layers retained higher precision or that the files include extra data such as quantization scaling parameters. The exact composition depends on the model card’s specifications.

    For disk planning, it is recommended to reserve at least 50% more space than the weight size to accommodate download caches, format-converted copies, and logs. Based on 1.56TB, you should have at least 2.4TB of available space.

    Download time must also be estimated. 1.56TB is approximately 12480Gb. Under an ideal 1Gbps bandwidth, this takes about 3.5 hours; at 100Mbps, it requires about 35 hours, significantly increasing the risk of connection drops mid-download.

    Estimating VRAM and GPU Requirements

    Using common 80GB accelerator cards as an example, simply loading the weights requires a considerable number of GPUs:

    • 1.56TB weights: Requires approximately 20 × 80GB cards
    • INT4 1.4TB weights: Requires approximately 18 × 80GB cards
    • FP16 5.6TB weights: Requires approximately 70 × 80GB cards

    These numbers account only for the weights themselves. The KV Cache will grow with context length and concurrent requests, and intermediate activation values also consume space. Actual VRAM requirements will far exceed the weight volume, so a healthy margin must be reserved.

    There is a correction to be made regarding the original source. It stated that 4-bit quantized weights are about 1.4TB, but simultaneously suggested running the model on 8 × 80GB cards. Eight cards provide a total of only 640GB of VRAM, which is less than half of 1.4TB. The weights cannot fully reside in VRAM under this configuration.

    Starting with only 8 cards typically requires relying on CPU Offload or NVMe Offload—storing temporarily unused expert weights in system memory or on disk and swapping them into VRAM when needed. This swapping occurs across the PCIe bus. The theoretical one-way bandwidth of PCIe 4.0 x16 is about 32GB/s, with actual usable bandwidth being lower. Generating each token may trigger multiple swaps, leading to noticeable speed drops. This configuration is suitable for functional verification but not for production services.

    How Much VRAM Can Quantization Save?

    Quantization represents weights using fewer bits and is the primary method for reducing VRAM usage. Methods like GPTQ and AWQ can compress weights with controllable precision loss.

    Using FP16 as a baseline, INT4 weights occupy roughly a quarter of the space. However, whether a quantized model is viable must be tested on your specific tasks. Code generation, mathematical reasoning, and long-text tasks are highly sensitive to precision changes, so testing should heavily cover these scenarios.

    Additionally, verify whether the model authors provide a corresponding quantized version. Self-quantization requires extra compute power and validation work.

    Pre-Deployment Checklist

    Before selecting a framework and deployment method, confirm the following items:

    1. Framework support: Ensure the framework supports the model’s MoE structure, expert parallelism, and your chosen quantization format.
    2. Parallelism strategy: Determine whether you need tensor parallelism, expert parallelism, or a combination of both. Assess how many cards are required and the interconnect bandwidth needs between cards.
    3. Context length: Long contexts significantly increase KV Cache usage; estimate VRAM based on your target length.
    4. Version locking: Record the versions of your framework, drivers, and CUDA to prevent future upgrades from altering model behavior.
    5. File verification: Check each shard against the hash values provided in the model card to confirm a complete download.

    Prefill and decode separation is an optimization method worth evaluating, particularly suited for long-context and high-concurrency scenarios. Whether to adopt it depends on your traffic characteristics and operational capabilities.

    How to Read the License

    Open weights do not equate to unconditional commercial use. When reading the license, pay close attention to the following:

    • Commercial use conditions: Check if there are limits on organization size or user count; the thresholds are defined by the original agreement.
    • Attribution and derivative works: Determine if redistributed or fine-tuned models must retain the original copyright notice.
    • Use restrictions: Identify if certain application scenarios are prohibited.
    • Output responsibility: Models may inherit biases from training data; industry applications may require manual review or output filtering mechanisms.

    Small and medium-sized teams can start with a self-compliance check based on the agreement. Large enterprises, as well as projects in regulated industries like finance and healthcare, should have legal counsel review the agreement. This article does not constitute legal advice.

    Local, Cloud, or API?

    The trade-offs between these three options can be evaluated using a few questions:

    • Can the data leave your local environment? If not, local or private cloud deployment is mandatory.
    • What is your actual monthly API call volume? For low volumes, pay-as-you-go APIs are typically more convenient; for high volumes, the amortized cost of fixed resources may be lower.
    • Can you afford the cost of purchasing hardware or long-term leasing?

    Cloud GPUs are billed by the hour, and cost estimation formulas depend heavily on your usage patterns and required hardware.