Local Deployment Cost and Hardware Planning for Ultra-Large MoE Models

    Deploying a trillion-parameter Mixture-of-Experts model locally requires much more than downloading weights and starting an inference server. This guide explains how to estimate weight storage, GPU memory, KV cache, compute, interconnect bandwidth, infrastructure, and operating costs. It also compares self-hosting with cloud resources and presents a staged validation process for planning a production-scale deployment.

    1. What Local Deployment Really Means for Ultra-Large Models

    When a model reaches the trillion-parameter scale, local deployment is no longer a matter of preparing a high-end workstation, downloading the model, and launching a service. It becomes an engineering project involving storage, GPU memory, compute, networking, cooling, power, and the software stack.

    For models based on a Mixture-of-Experts (MoE) architecture, a common misconception is that GPU memory only needs to match the number of parameters activated during each inference step. In reality, the number of active parameters mainly affects computation per token. Model weights generally still need to be placed in GPU memory, host memory, or high-speed storage ahead of time.

    During inference, the router selects a subset of experts for each input token. However, those experts may be distributed across different devices. The deployment must therefore address both weight placement and communication between GPUs.

    At a minimum, local deployment cost estimates should consider:

    1. How much storage and GPU memory the model weights require;
    2. How much KV cache inference will consume;
    3. Whether the accelerators provide sufficient memory bandwidth and compute capacity;
    4. Whether the interconnect provides enough bandwidth between devices;
    5. The long-term cost of hardware, facilities, electricity, and operations.

    2. Why Trillion-Parameter MoE Models Need So Much Memory

    Assume a model contains approximately 2.8 trillion parameters and uses a Mixture-of-Experts architecture. It may contain hundreds of experts, while only a small subset is activated for each token. Even if only 1% to 2% of the experts are used for an individual token, it is incorrect to multiply the total parameter count by the activation ratio to estimate deployment memory.

    The reasons include:

    • Experts that are not activated by the current token are still part of the model weights;
    • Later tokens may be routed to different experts;
    • Multiple concurrent requests may activate different experts at the same time;
    • Production systems generally keep weights in high-speed memory or GPU memory to avoid repeatedly loading them from disk or ordinary host memory;
    • When weights are sharded, devices must also exchange intermediate activations.

    Therefore, active parameters are more useful for estimating compute requirements, while total parameters are the primary basis for estimating complete weight storage and distributed deployment size.

    3. How Much Space Do Quantized Weights Require?

    With traditional 4-bit weights, the theoretical raw data size can be estimated as follows:

    1. Weight capacity ≈ Number of parameters × 4 bits ÷ 8

    For 2.8 trillion parameters:

    1. 2.8 × 10^12 × 4 ÷ 8
    2. ≈ 1.4 × 10^12 bytes
    3. ≈ 1.4 TB

    This is only an ideal lower bound. Practical quantization formats usually store more than 4-bit values. They may also require scale factors, grouping information, zero points, tensor metadata, and memory-alignment overhead.

    For example, some block-based low-bit formats store one 8-bit scale for every 32 4-bit weights. The average storage per weight is then approximately:

    1. 4 bits + 8 bits ÷ 32
    2. = 4.25 bits

    The resulting estimate is:

    1. 2.8 × 10^12 × 4.25 ÷ 8
    2. ≈ 1.49 TB

    This still excludes:

    • Non-quantized tensors;
    • Router and normalization parameters;
    • Quantization metadata;
    • Parameter sharding and alignment overhead;
    • Inference runtime buffers;
    • Communication buffers;
    • KV cache;
    • Temporary activations;
    • Additional memory required for concurrent requests.

    Consequently, approximately 1.5 TB should be treated only as an estimate for weight capacity, not as the complete GPU memory requirement.

    4. Capacity Estimates at Different Precisions

    The following table provides a rough estimate:

    Weight precision Theoretical storage per parameter Theoretical capacity for 2.8 trillion parameters
    FP16/BF16 16 bits Approximately 5.6 TB
    FP8 8 bits Approximately 2.8 TB
    4-bit 4 bits Approximately 1.4 TB
    Block-wise 4-bit Approximately 4.25 bits Approximately 1.49 TB

    In a real deployment, additional GPU memory must be reserved. Keeping memory at 100% utilization for extended periods can lead to:

    • Failure to allocate temporary buffers during startup;
    • Out-of-memory errors for long-context requests;
    • Frequent memory reclamation under concurrent workloads;
    • Insufficient communication buffers;
    • Sudden increases in inference latency;
    • Service crashes caused by memory fragmentation.

    If the weights require approximately 1.5 TB, a safer total GPU memory plan will normally need to exceed that figure. The exact amount depends on context length, concurrency, the quantization implementation, and the inference framework.

    5. Why Ordinary Storage or Host Memory Is Not Enough

    In theory, model weights can be stored on SSDs or in host memory and loaded into GPU memory when needed. For online inference, however, this approach usually causes serious performance problems.

    First, storage access latency is much higher than GPU memory latency. Inference proceeds continuously, and if every token must wait for expert weights to load, generation speed can drop significantly.

    Second, MoE expert access is dynamic. Different tokens may be routed to different experts, making access patterns difficult to predict and cache-hit rates unstable.

    Third, data transfer bandwidth between host memory and accelerators is limited. Even if host memory has enough capacity, frequent data movement can leave compute units waiting for data.

    Ordinary storage is therefore better suited for:

    • Storing model files;
    • Loading weights during startup;
    • Saving checkpoints;
    • Acting as a slower offload layer when GPU memory is insufficient;
    • Supporting low-concurrency, low-throughput offline tasks.

    For real-time conversations, high-concurrency APIs, or stable production services, critical weights should remain in GPU memory whenever possible. At a minimum, they should reside in a high-bandwidth unified-memory system.

    6. Why Deployment May Require Dozens of Accelerators

    Assume each accelerator has 80 GB of GPU memory. Even with an ideal 4-bit estimate, 1.5 TB of weights would require:

    1. 1.5 TB ÷ 80 GB ≈ 19 GPUs

    This represents only theoretical weight sharding and excludes runtime overhead. In practice, the deployment generally cannot use fewer than the low twenties in this configuration. GPUs with more memory can reduce the device count, while higher precision, longer contexts, and higher concurrency will increase it.

    A production deployment must also account for:

    1. Memory headroom
      Space is needed for KV cache, communication buffers, and temporary tensors.

    2. Compute capacity
      Although only some experts are active, every token still requires attention, routing, and expert feed-forward computation.

    3. Redundancy
      A production service should not fail completely because one accelerator becomes unavailable. Spare capacity or a recoverable sharding strategy may be necessary.

    4. Concurrency
      Concurrent requests increase KV cache and intermediate activation usage. Capacity cannot be estimated from a single-user workload alone.

    5. Communication efficiency
      As the number of devices increases, cross-device communication becomes more frequent. Interconnect bandwidth and topology become increasingly important.

    For trillion-parameter MoE models, production deployments commonly use dozens of high-memory accelerators in a high-speed interconnected node or cluster rather than simply combining a small number of devices.

    7. Inter-GPU Communication Can Become the Real Bottleneck

    MoE inference commonly follows this sequence:

    1. Input tokens
    2. ↓
    3. Router computation
    4. ↓
    5. Select target experts
    6. ↓
    7. Send activations to the corresponding devices
    8. ↓
    9. Run expert networks
    10. ↓
    11. Send results back to the original devices
    12. ↓
    13. Combine expert outputs
    14. ↓
    15. Continue computation in subsequent layers

    When experts are distributed across many devices, each token may trigger data exchange between GPUs. This type of communication is often implemented as an all-to-all exchange. Its performance depends heavily on:

    • Inter-GPU bandwidth;
    • Communication latency;
    • Network topology;
    • Message count;
    • Token batch size;
    • Expert load balance;
    • Whether communication and computation can overlap.

    A system with powerful accelerators but ordinary network connections may spend much of its time waiting for communication, preventing theoretical compute capacity from becoming practical throughput. Adding more devices does not necessarily improve performance linearly. Communication overhead can grow rapidly as the deployment expands.

    A more effective design is to divide devices into several high-speed communication domains. As much expert computation as possible should be completed within each domain, with limited cross-domain communication used for global coordination.

    8. How Much Additional Capacity Does KV Cache Require?

    Weight capacity is only the first part of the memory plan. Long-context inference also requires KV cache, which stores previously computed keys and values so the system does not need to recompute the entire historical context for every newly generated token.

    KV cache usage is generally affected by:

    • Context length;
    • Number of concurrent requests;
    • Number of layers;
    • Number of KV heads;
    • Dimension of each head;
    • KV cache precision;
    • Whether paged caching is used;
    • Whether prefix reuse is enabled.

    When context length grows from several thousand tokens to hundreds of thousands of tokens, KV cache can change from a relatively small overhead into a major part of the GPU memory budget. This is especially important for enterprise knowledge Q&A, long-document analysis, and multi-turn conversations. Device requirements should not be estimated from model weights alone.

    If GPU memory is limited, possible measures include:

    • Reducing KV cache precision;
    • Using paged caching;
    • Limiting the maximum context length;
    • Limiting per-instance concurrency;
    • Compressing historical messages;
    • Offloading part of the cache to host memory;
    • Using prefix caching to reduce repeated computation.

    These techniques can reduce capacity pressure, but they generally introduce trade-offs in latency, throughput, or implementation complexity.

    9. Cost Components of Local Deployment

    The total cost cannot be estimated from accelerator purchase prices alone. A complete budget should include the following components.

    1. Accelerators

    Accelerators are usually the largest initial expense. Cost depends on:

    • GPU memory capacity;
    • Supported numerical formats;
    • Memory bandwidth;
    • Interconnect capability;
    • Number of devices;
    • Required redundancy;
    • Hardware lifecycle and warranty support.

    A design involving dozens of high-memory accelerators represents a substantial hardware investment and should not be compared with an ordinary server or personal workstation.

    2. Servers and Interconnect Equipment

    The deployment may require multi-GPU servers, network switches, dedicated interconnect modules, fiber or high-speed cables, and management nodes. Interconnect equipment can account for a significant portion of the overall budget.

    3. Storage Systems

    Weights, checkpoints, logs, and caches require high-capacity storage. Model storage should preferably be separated from business logs, with a high-throughput SSD system used to prevent model loading, model updates, and log writes from interfering with one another.

    4. Facilities, Power, and Cooling

    Multi-accelerator servers consume substantial power. The facility must provide:

    • Stable power;
    • Uninterruptible power supplies;
    • Rack space;
    • Precision cooling;
    • Temperature and humidity monitoring;
    • Fire protection and physical security;
    • Network access and remote management.

    Over long operating periods, electricity and cooling can become major recurring costs.

    5. Software Engineering and Operations

    Additional work is required for model conversion, quantization validation, distributed startup, monitoring and alerting, fault recovery, version management, API serving, and security auditing. In enterprise environments, software engineering and operations can cost as much as, or more than, the hardware deployment itself.

    10. How to Decide Between Self-Hosting and Cloud Resources

    If the goal is model research, short-term validation, or infrequent offline processing, purchasing dozens of accelerators is often not economical. When utilization is low, a large amount of capital may remain idle.

    Self-hosting is more suitable when:

    • The service must run continuously and reliably;
    • Model usage is high and sustained;
    • Data cannot leave the local environment;
    • The organization has professional facilities and an operations team;
    • It can accept a large upfront investment;
    • The inference framework and hardware require deep optimization.

    Cloud resources are more suitable when:

    • Demand fluctuates significantly;
    • Short-term testing or temporary scaling is required;
    • The final model size has not been determined;
    • The organization does not want to manage hardware maintenance and depreciation;
    • Business concurrency has not yet stabilized;
    • Rapid technical validation is important.

    A hybrid approach is also possible. Core low-latency services can run locally, while burst traffic, offline workloads, and experiments use cloud accelerators. This can balance data security, cost, and elasticity.

    11. A More Reliable Deployment Process

    Do not purchase hardware based solely on the theoretical minimum. A staged validation process is safer.

    Stage 1: Build a small test environment
    Verify model format compatibility, quantization accuracy, inference framework support, and single-request latency.

    Stage 2: Test context length and concurrency
    Measure memory usage under different context lengths and concurrency levels. Record the actual consumption of weights, KV cache, temporary buffers, and communication memory.

    Stage 3: Build a multi-GPU environment
    Test expert placement, inter-GPU communication, load balancing, and fault recovery.

    Stage 4: Run load tests
    Measure throughput, time to first token, per-token latency, peak memory usage, power consumption, and device utilization.

    Stage 5: Make the production scaling decision
    Use real workload metrics to determine whether the system should be expanded to production scale.

    Conclusion

    The cost of locally deploying a trillion-parameter MoE model is determined jointly by the weight capacity implied by the total parameter count and the communication and runtime overhead of distributed inference.

    Even with 4-bit quantization, a model with approximately 2.8 trillion parameters may require more than 1.5 TB of weight storage. Once KV cache, runtime buffers, and redundancy are included, the deployment will typically require dozens of high-memory, high-bandwidth accelerators with fast interconnects.

    A reliable budget should therefore evaluate more than parameter count multiplied by bytes per parameter. It must also consider GPU memory capacity, memory bandwidth, inter-device communication, context length, concurrency, utilization, facility requirements, and operational costs.

    The safest approach is to perform small-scale measurements before purchasing a cluster. This helps avoid a system that can theoretically load the model but delivers insufficient throughput, as well as a costly deployment whose hardware remains underutilized.