Deploying a 2.8T MoE Open-Source Model Locally: Memory, Compute, and Runtime Tradeoffs

    This article examines local deployment of a 2.8T-parameter MoE open-source model with approximately 104B active parameters per token. It explains why total parameter count drives memory requirements while active parameters drive inference compute, provides weight-size estimates for FP16, 8-bit, and 4-bit quantization, and covers KV cache, 8-GPU feasibility, inference engines, deployment checklists, common OOM causes, and operational monitoring.

    Key Takeaways First: Estimate Capacity Before Compute

    When an open-source MoE model with about 2.8T total parameters and roughly 104B active parameters per token appears, developers should not focus only on whether they can download it. They should first answer three questions:

    1. How much memory or storage is required for the weights alone?
    2. How many parameters are actually activated during a single inference step?
    3. How should local deployment balance single-node, multi-GPU, quantization, KV cache, and expert parallelism?

    For this class of model, local deployment is not about simply adding more GPUs. It requires separating capacity from compute. Total parameter count determines weight footprint and the memory threshold; active parameter count determines the compute cost of each inference pass. If you look only at total parameters, you may overestimate compute requirements. If you look only at active parameters, you may underestimate memory pressure. A practical decision must budget weights, KV cache, activation buffers, communication buffers, and runtime overhead together.

    This article uses a MoE structure with approximately 2.8T total parameters, 104B active parameters, 896 routed experts, 2 shared experts, and 93 layers as the reference. It provides a more engineering-oriented method for evaluating local deployment.


    1. 2.8T Parameters and 104B Active Parameters: Sparsity, Not Just Scale

    The key design idea behind this type of MoE model is parameter sparsification. Two metrics describe the model:

    • About 2.8T total parameters: This represents the upper bound of the model’s knowledge capacity. All weights must be stored on disk or in accessible memory.
    • About 104B active parameters per token: This represents the number of parameters that actually participate in matrix operations when processing one token.

    The ratio is roughly 27:1. This means the model has a large capacity, but each forward pass uses only a small portion of its parameters.

    This has direct implications for local deployment:

    • Memory usage is mainly determined by the total parameter count. Even if only 104B parameters are activated during inference, the full 2.8T weights must be loaded into an accessible storage tier; otherwise, complete inference cannot proceed.
    • Compute cost is mainly determined by the active parameter count. A single inference step is closer to a 104B-parameter workload than a 2.8T-parameter workload.
    • Throughput and latency can be affected by expert routing. Different tokens may activate different experts, which can create uneven load during expert parallelism.

    Therefore, it is inaccurate to say that a 2.8T model requires 2.8T of compute, just as it is inaccurate to say that ordinary GPUs can run it because only 104B parameters are active. A more accurate description is:

    This is a class of model with a high memory threshold and relatively controllable per-inference compute cost. Whether it can run locally depends on weight precision, per-GPU memory, parallel strategy, context length, concurrency, and KV cache management.


    2. MoE Structure Breakdown: 896 Routed Experts, Top-16 Routing, and 2 Shared Experts

    This type of model usually adopts a fine-grained sparse expert structure that has become relatively common in the industry:

    • 896 routed experts: Each token is evaluated against the experts by a gating network. Only the Top-16 experts participate in computation.
    • 16 active experts per token: A single token touches only about 1.8% of the routed experts, keeping compute cost relatively low.
    • 2 shared experts: Shared experts are always active for all tokens. They are responsible for general language capability, common-sense knowledge, and cross-domain base representations.
    • 93 layers: Deeper networks can improve feature abstraction, but they also mean more expert weights must remain resident in memory or be quickly accessible.

    An MoE routing process can be compared to a team of specialists reviewing a case:

    1. The gating network acts like a triage desk. It decides which experts should handle the current token based on its semantic features.
    2. The Top-16 routed experts act like consultation specialists. Only these experts perform dedicated computation for the current token.
    3. The shared experts act like always-on general physicians. They provide general capability for every token.
    4. The outputs of all experts are combined to form the representation of the current token.

    Routing sparsity improves efficiency, while expert redundancy improves expressiveness. However, engineering teams should watch out for load imbalance caused by expert parallelism. If some experts are activated by too many tokens, the corresponding GPUs may become hotspots and reduce overall throughput.


    3. Memory Estimation: Use a Consistent Definition to Avoid Mixing 1.4 TB and 1.56 TB

    Before local deployment, the first thing to confirm is the weight footprint. For 2.8T parameters, weight size can vary significantly depending on quantization precision.

    Using the simplest formula:

    1. Weight size = total parameters × bytes per parameter

    The results are:

    • FP16: 2 bytes per parameter; about 5.6 TB for 2.8T parameters.
    • 8-bit: 1 byte per parameter; about 2.8 TB.
    • 4-bit: 0.5 bytes per parameter; about 1.4 TB.

    If an article or document mentions “4-bit quantization, 2.8T parameters, and about 1.56 TB of weights,” the difference in measurement needs to be clarified. Possible reasons include:

    1. Quantization metadata, index files, configuration files, and weight layout overhead is included.
    2. The actual weight format is not exactly 0.5 bytes per parameter.
    3. Some modules are not quantized, such as embeddings, layer normalization, routers, and attention projections.
    4. Runtime loading buffers, memory alignment, paging management, or expert cache overhead is included.
    5. A mixed-precision quantization scheme uses different bit widths.

    For local deployment estimation, it is best to use two separate measurements: pure weight bytes and total memory usage including overhead. Otherwise, it is easy to confuse the theoretical minimum with the practical deployment value.

    The following code provides a more standardized memory estimation example. All return values are in GB:

    1. def estimate_memory(
    2. num_params,
    3. bytes_per_param,
    4. num_layers,
    5. hidden_dim,
    6. seq_len,
    7. batch=1,
    8. kv_bytes=2
    9. ):
    10. # Return values in GB
    11. weights_gb = num_params * bytes_per_param / 1e9
    12. # Simplified KV cache estimate; assumes K and V tensors per token
    13. # Does not account for GQA/MQA/MLA compression; replace with model config in production
    14. kv_cache_gb = (
    15. 2 * num_layers * hidden_dim * seq_len * batch * kv_bytes
    16. ) / 1e9
    17. return weights_gb, kv_cache_gb
    18. w, kv = estimate_memory(
    19. num_params=2.8e12,
    20. bytes_per_param=0.5,
    21. num_layers=93,
    22. hidden_dim=7168,
    23. seq_len=100_000
    24. )
    25. print(f"Weights: approx {w:.0f} GB, KV cache: approx {kv:.1f} GB (without GQA/MQA compression)")

    With this example, the pure 4-bit weight size is:

    1. 2.8e12 × 0.5 / 1e9 = 1400 GB, or about 1.4 TB

    Several points are important:

    • hidden_dim=7168 is only an example assumption. In production, you must read the actual hidden_size, num_hidden_layers, num_attention_heads, num_key_value_heads, head_dim, num_experts, and num_experts_per_tok fields from the model configuration file.
    • The KV cache formula above does not account for GQA, MQA, MLA, or low-rank KV compression. If the model uses GQA or MLA, actual KV cache usage may be significantly lower than this rough estimate.
    • With tensor parallelism, weights and KV cache are split across multiple GPUs. However, the split method, communication buffers, and framework implementation affect peak memory usage.
    • If CPU offloading or NVMe offloading is enabled, theoretical GPU memory requirements decrease, but inference latency increases.

    Weight Size Comparison

    Precision / quantization Bytes per parameter Theoretical weight size for 2.8T Local deployment implication
    FP16 2 About 5.6 TB Usually far beyond single-node GPU memory
    8-bit 1 About 2.8 TB Requires high-end multi-GPU or multi-node environments
    4-bit 0.5 About 1.4 TB May enter the high-memory multi-GPU discussion range, but metadata and runtime overhead must be considered

    The table is not meant to provide an absolute answer. It is a reminder for developers: the answer to “Can it run locally?” is completely different under different quantization definitions.


    4. Are 8 GPUs Enough? It Depends on Conditions

    Many discussions say that this type of model needs at least 8 GPUs for local deployment. That statement is not precise enough. A more accurate version is:

    With about 4-bit quantization, all weights resident on a single node, limited per-GPU memory, and no CPU/NVMe offloading, 8 or more GPUs may be required. If lower-bit quantization, expert offloading, CPU/NVMe buffering, or multi-node deployment is allowed, the conclusion changes.

    Assume 4-bit weights are about 1.4 TB. If all weights must remain resident in GPU memory, 8 GPUs require an average of at least:

    1. 1.4 TB / 8 ≈ 175 GB

    This covers only the weights. It does not include:

    • KV cache
    • Activation buffers
    • Communication buffers
    • Inference engine runtime
    • Expert routing cache
    • Temporary space for quantization and dequantization
    • Overhead from multi-process or multi-GPU frameworks

    Therefore, if each GPU has only 80 GB of memory, 8 GPUs provide 640 GB total, which is usually not enough for 1.4 TB of weights. If each GPU has 141 GB or 192 GB, KV cache and peak memory still need to be calculated. If each GPU reaches about 200 GB, 8 GPUs may have enough space to hold the weights, but long context and concurrency pressure still need to be checked.

    Possible alternatives for local deployment include:

    1. More aggressive quantization: For example, mixed bit-width quantization, keeping important layers at higher precision and quantizing less important layers to lower bits.
    2. Expert parallelism plus tensor parallelism: Distribute experts across GPUs to reduce per-GPU weight pressure.
    3. CPU offloading: Move less active experts or some layers to host memory.
    4. NVMe offloading: Move low-frequency expert weights to high-speed SSDs, but this increases access latency.
    5. Shorter context length: Reduce KV cache usage.
    6. Lower batch size: Reduce the number of requests processed at the same time.
    7. Multi-node inference: If single-node GPU memory is insufficient, multiple nodes can be used, but network bandwidth and all-to-all/all-reduce overhead must be considered.

    Therefore, “8 GPUs” should not be treated as a fixed threshold. It should be understood as an engineering result under a specific quantization, context length, and concurrency setting.


    5. Executable Deployment Checklist

    If you plan to deploy this type of model, the following checklist is more practical than general principles:

    Check item Key details Suggested output
    Weight precision and file size Confirm whether the model uses FP16, 8-bit, 4-bit, or mixed quantization; check the total byte size of safetensors/bin files Record theoretical weight size and actual file size
    Model configuration Check num_hidden_layers, hidden_size, num_experts, num_experts_per_tok, num_key_value_heads, and head_dim Replace example values in the memory estimation formula
    Per-GPU memory Confirm available memory per GPU, ECC status, and MIG configuration Calculate per-GPU weight capacity
    Total memory Calculate total GPU memory on the node and subtract system usage Determine whether weights, KV cache, and activations fit
    Interconnect bandwidth Confirm NVLink, NVSwitch, PCIe 4.0/5.0, InfiniBand, or RoCE Determine whether TP/EP/PP communication is a bottleneck
    Inference engine Confirm whether vLLM, SGLang, TensorRT-LLM, or another engine supports the target MoE architecture Record engine version and known MoE support
    Quantization scheme Confirm quantization algorithm, calibration data, quantization kernels, and target GPU support Evaluate accuracy loss and performance gain
    Parallel strategy Define the combination of TP, PP, and EP; confirm expert distribution policy Output parameters such as tensor_parallel_size, pipeline_parallel_size, and expert_parallel_size
    Expert load Monitor routed expert activation distribution, hotspot experts, and all-to-all latency Determine whether expert load balancing is needed
    KV cache Confirm support for GQA/MQA/MLA, KV quantization, paged cache, and dynamic cache Estimate long-context and concurrency peaks
    OOM fallback Prepare to reduce max_model_len, reduce batch size, enable offloading, switch quantization, or add nodes Create an incident response plan
    Monitoring and alerting Monitor memory usage, time to first token, throughput, queue length, and GPU utilization Establish a capacity baseline

    If any item is not confirmed, it is not recommended to conclude that the model can run locally and stably.


    6. Inference Engines and Key Parameters: Choosing Among vLLM, SGLang, and TensorRT-LLM

    For MoE models, an inference engine must support not only the standard Transformer structure but also expert routing, expert parallelism, quantization kernels, and multi-GPU communication.

    Common choices include:

    • vLLM: Suitable for quickly building high-throughput inference services. Pay attention to PagedAttention, continuous batching, tensor parallelism, and MoE support.
    • SGLang: Suitable for complex structured generation and high-concurrency scenarios. Pay attention to its MoE routing, caching, and scheduling capabilities.
    • TensorRT-LLM: Suitable for deployments that pursue maximum performance. Pay attention to quantization, kernel optimization, expert parallelism, and support for specific GPU architectures.

    Regardless of the engine, the following parameters are important:

    1. tensor_parallel_size
    2. pipeline_parallel_size
    3. expert_parallel_size
    4. max_model_len
    5. gpu_memory_utilization
    6. quantization
    7. kv_cache_dtype
    8. enable_chunked_prefill
    9. max_num_seqs
    10. enable_prefix_caching

    These parameters directly affect memory usage, throughput, and latency. For example:

    • A larger max_model_len makes KV cache growth more likely.
    • A very high gpu_memory_utilization may reduce system buffer space.
    • A larger expert_parallel_size distributes experts more finely, but increases communication and load-balancing complexity.
    • A lower quantization bit width saves memory but increases accuracy risk.
    • A larger max_num_seqs increases concurrency but also increases peak memory and scheduling pressure.

    In practice, it is best to start with short context and low concurrency for functional validation, then gradually increase context length and batch size. Do not begin stress testing with maximum context and high concurrency; otherwise, issues may be incorrectly judged as model failure.


    7. Common Mistakes and FAQ

    1. How Should I Choose Quantization for an 8-GPU Local Deployment?

    First confirm total hardware memory and per-GPU memory, then choose the quantization level:

    • If per-GPU memory is very limited and single-node deployment is desired, test 4-bit or mixed quantization first.
    • If accuracy is sensitive, test 8-bit first.
    • If the workload involves long context, code, or math tasks, do not judge only by low-bit memory savings; run small-sample quality evaluations.
    • If the model contains many unquantized modules, the actual file size may be larger than the theoretical 4-bit size.

    Recommended process:

    1. Read config.json
    2. → Check actual weight file size
    3. → Choose 8-bit / 4-bit / mixed quantization
    4. → Evaluate with a small business sample
    5. → Check peak memory usage
    6. → Decide whether to deploy

    2. What Should I Do If There Is Not Enough Memory?

    Insufficient memory usually has multiple causes. Check in the following order:

    1. Reduce max_model_len.
    2. Reduce batch size.
    3. Check whether the KV cache supports GQA/MQA/MLA.
    4. Enable KV cache quantization.
    5. Use more aggressive weight quantization.
    6. Enable CPU offloading.
    7. Move less active experts to NVMe.
    8. Add more GPUs or nodes.
    9. Adjust TP/EP/PP parallelism.
    10. Check for memory leaks or fragmentation.

    Note that CPU/NVMe offloading increases latency. If the workload is sensitive to time to first token, offloading should not be the first choice.

    3. How Should I Investigate Hotspots in Expert Parallelism?

    The main risk of MoE expert parallelism is load imbalance. Check the following:

    • Token activation count per expert
    • Number of experts hosted on each GPU
    • Whether a few experts receive too many tokens
    • Whether all-to-all communication latency increases
    • Whether some GPU utilization remains higher than others for a long time
    • Whether request queues build up

    If hotspots are obvious, consider:

    • Adjusting expert sharding policy
    • Increasing expert parallelism
    • Using load-balanced routing
    • Replicating hotspot experts across nodes
    • Adjusting capacity factor or routing strategy
    • Caching results for high-frequency requests

    4. How Large Is the KV Cache with Long Context?

    KV cache size depends on the number of layers, hidden size, sequence length, batch size, and KV compression method. A simplified formula is:

    1. KV cache ≈ 2 × layers × hidden_dim × sequence length × batch × bytes per element

    If the model uses GQA, MQA, MLA, or KV quantization, the actual value may be significantly lower. For context lengths in the hundreds of thousands, KV cache may become the second-largest memory consumer after weights and must be estimated separately.

    5. What Are Common Causes of OOM?

    Common causes include:

    • Weight precision does not match expectations
    • Actual file size is larger than the theoretical estimate
    • Quantization metadata and runtime buffers are ignored
    • max_model_len is set too high
    • Batch size is too high
    • KV cache does not use compression such as GQA/MLA
    • Poor TP/EP configuration causes peak memory on a single GPU
    • Residual memory from multi-process inference services
    • Monitoring only total memory instead of per-GPU peak memory

    8. Risk and Operations Advice: Deployment Is Not Done After One Successful Launch

    After deploying this type of model locally, service stability must also be considered. Long context, high concurrency, expert routing, and multi-GPU communication can cause memory fluctuations, latency spikes, or overheating on individual GPUs.

    At minimum, establish the following operational mechanisms:

    1. Memory monitoring: Monitor total memory, per-GPU memory, peak memory, and fragmentation.
    2. Latency monitoring: Record time to first token, per-token output latency, and queue latency separately.
    3. Throughput monitoring: Observe request success rate, queue length, and concurrency limits.
    4. Expert load monitoring: Identify hotspot experts and hotspot GPUs.
    5. Rate limiting: Limit requests with extremely long context or extremely large batch sizes.
    6. Circuit breaking and fallback: When memory approaches a threshold, automatically reduce context length or switch to a lower-precision model.
    7. Log masking: Avoid leaking user privacy or sensitive input in inference logs.
    8. Version management: Fix the versions of the inference engine, CUDA, drivers, quantization format, and model weights to avoid environment drift.

    For production environments, validating only whether the service starts is not enough. A more reasonable process is:

    1. Functional validation
    2. → Short-context stress test
    3. → Medium-context stress test
    4. → Long-context stress test
    5. → Concurrency stress test
    6. → Failure fallback drill
    7. → Capacity planning
    8. → Canary rollout

    9. Summary: Deploying a 2.8T MoE Model Locally Requires Three Calculations

    The release of open-source sparse MoE models at the trillion-parameter scale makes local deployment more practical to discuss, but it also increases the risk of misjudgment. To determine whether deployment is feasible, developers need to calculate at least three accounts:

    1. Weight account: A 2.8T model requires about 5.6 TB, 2.8 TB, and 1.4 TB under FP16, 8-bit, and 4-bit, respectively. Actual files may also include metadata and runtime overhead.
    2. Compute account: About 104B parameters are active per token. Compute cost is determined by active parameters, not by the full 2.8T parameter count.
    3. System account: KV cache, expert parallelism, tensor parallelism, pipeline parallelism, communication bandwidth, OOM fallback, and monitoring capabilities all affect whether the deployment can be operated reliably.

    Therefore, the question “Can 8 GPUs run it locally?” cannot be answered with a simple yes or no. A more professional answer is:

    If quantization is about 4-bit, all weights are resident, per-GPU memory is sufficient, and context length and concurrency are controlled, an 8-GPU high-memory node may be worth considering. However, if per-GPU memory is limited, context is very long, or concurrency is high, you need more GPUs, lower precision, offloading, or a redesign of the parallel strategy.

    For developers, the most important thing is not to chase an absolute conclusion, but to build a personal memory budget model, a quantization evaluation process, and a failure fallback mechanism. Only by combining parameter structure, weight size, KV cache, inference engines, and operational monitoring can a large open-source MoE model be turned into stable local inference capability.