Local Deployment of Trillion-Parameter LLMs: VRAM and Cost Estimation

    This article explains how to estimate the hardware requirements for locally deploying a trillion-parameter Mixture-of-Experts (MoE) model. It breaks deployment into three target tiers, derives VRAM lower bounds from total parameter count with worked calculations, examines why interconnect bandwidth determines whether multi-GPU sharding is viable, and discusses GPU-CPU heterogeneous inference as a fallback when VRAM is limited.

    1. Define Your Target Tier First

    The first step in locally deploying a very large Mixture-of-Experts (MoE) model is to define your goal. Depending on the target, hardware requirements can differ by an order of magnitude. This article uses three tiers:

    • Tier 1: It runs. The model loads fully and produces output. Single-digit token/s speeds are acceptable, and concurrency is not a concern.
    • Tier 2: Usable by one person. A single user gets around 25 token/s output speed, which feels reasonably smooth for interactive use.
    • Tier 3: Small-scale concurrency. Ten concurrent requests run simultaneously, each sustaining above 25 token/s, with quantization no lower than 8-bit floating point.

    The resource gap between tiers comes mainly from two factors: whether all weights can reside in high-speed memory, and the communication and caching overhead under concurrency.

    2. VRAM Lower Bounds Are Determined by Total Parameters

    MoE models are often misunderstood as “few activated parameters, little memory needed.” In reality, the router selects a small subset of experts at every layer from the full set, so all expert weights must remain in addressable storage. The activation ratio determines compute per token—not storage footprint.

    Take a model with roughly 2.8 trillion parameters as an example: each layer has 896 experts, and 16 are activated per token. The expert-level activation ratio is about 1.79%. Note this is the ratio at the expert level, not the strict parameter activation ratio, because attention layers and shared modules also participate in computation. Based on public information, these figures are estimates; always refer to the officially released configuration files for authoritative numbers.

    Weight size is calculated in three steps:

    1. Theoretical floor with pure 4-bit storage: 2.8T × 4 bits ÷ 8 ≈ 1,400 GB.
    2. With microscaling block floating-point format (every 32 elements share one 8-bit scale factor), the effective bit width is 4.25 bits, giving roughly 1,487.5 GB of weights.
    3. Real deployments must also account for non-4-bit tensors, metadata, memory alignment, runtime workspace, and the KV cache.

    The following snippet lets you quickly reproduce these two numbers:

    1. def weight_gb(params_b, bits, block=32, scale_bits=8):
    2. """Estimate weight storage in decimal GB. params_b is in billions of parameters."""
    3. eff_bits = bits + (scale_bits / block if block else 0)
    4. return params_b * 1e9 * eff_bits / 8 / 1e9
    5. print(weight_gb(2800, 4, block=0)) # 1400.0, bare 4-bit floor
    6. print(weight_gb(2800, 4)) # 1487.5, including scale factors

    For reference, a comparable model with about 671 billion parameters needs roughly 685 GB for weights plus its multi-token prediction module at FP8 precision. With 4-bit quantization, weights plus activations come to about 400 GB, which fits on eight 80 GB accelerators (640 GB total). The target model is roughly four times that size, so the VRAM floor for a full-fidelity deployment scales into the terabyte range.

    3. Interconnect Bandwidth Determines Whether Multi-GPU Sharding Works

    When experts are distributed across multiple GPUs, each token’s activations must be sent—after routing—to the GPU hosting the target experts, and the results must be fetched back after computation. This all-to-all communication happens at every layer. If communication latency exceeds compute time, the accelerators sit idle and the benefit of adding more GPUs is cancelled out.

    For this reason, the official recommendation is to build a supernode with 64 or more accelerators connected through high-speed interconnect, enlarging the communication domain so that most data movement stays within it. Lower-bandwidth solutions that span multiple machines generally cannot meet the latency and throughput demands of this class of model.

    4. Heterogeneous Inference: Offloading Experts to System Memory

    When the VRAM budget falls short, a common approach is GPU-CPU heterogeneous inference, assigning storage based on computational characteristics:

    • Attention layers are compute-intensive and every token passes through them, so they stay on the GPU to take advantage of high-bandwidth memory.
    • Sparse experts occupy most of the storage, but only a few are activated per token, so they can be offloaded to CPU memory and invoked on demand according to routing results.

    In published heterogeneous inference tests, a dual-socket CPU server paired with one high-end consumer GPU ran a ~377 GB 4-bit quantized model at over 200 token/s in prefill and around 14 token/s in decode. Keep in mind that these figures come with constraints on the expert-selection strategy and cannot be directly extrapolated to scenarios involving all experts and full routing.