2.8T-Parameter Open-Source MoE: A Practical Guide to Local 8-GPU Deployment

    A recently released open-source multimodal Agent model has roughly 2.8T total parameters yet activates only about 104B per token. This article explains what that gap means for running the model locally on 8 GPUs: how the MoE structure is composed, how to build a memory and compute budget, which parallelism strategies (TP, EP, PP, DP) fit a single node, how to optimize inference for long context and Agent/multimodal workloads, and how to select hardware and evaluate a running service. The core takeaway: activated parameters determine compute (which stays manageable), total parameters determine memory (the 1.56TB footprint makes 8 GPUs the floor, with 4-bit quantization as the prerequisite), and bandwidth—not FLOPs—is the real bottleneck during decoding.

    Introduction: Read the Ledger Before You Run It

    A model at the trillion-parameter scale — a native multimodal Agent model — recently published its weights publicly. The official release highlights a few key figures:

    • Total parameters of about 2.8T, with only ~104B activated per token.
    • A Mixture-of-Experts (MoE) architecture: 896 routed experts, with each token selecting 16 per layer, plus 2 shared experts.
    • 93 layers, with a context length of up to 100K.
    • The model was continued-trained from the previous-generation base model and natively supports multimodal inputs including images and text.
    • The local deployment floor is 8 GPUs.

    Buried in these figures is a key tension: compute is determined by the 104B activated parameters, while memory footprint is determined by the 2.8T total parameters. MoE’s sparse activation solves the “can we afford to compute it” problem, but not the “can we fit it” problem. Understanding these two separate ledgers is the prerequisite for judging whether you can run it locally, how you should run it, and whether it is worth running.

    Using this class of ultra-large-scale open-source MoE models as a sample, this article breaks down the model structure, memory and compute budgets, parallel deployment strategies, inference performance optimization, and engineering deployment — offering a reusable methodology.


    1. Model Structure Breakdown: How the 2.8T Is Composed

    1.1 Parameter Ledger: Total, Activated, and Sparsity

    MoE models generally split their parameters into two parts:

    • Non-routed part: attention projections, token embeddings and the output layer, normalization, and routing/gating. Every token passes through this part; it is called dense activation.
    • Routed part: the expert weights selected dynamically per token, which make up the absolute majority of total parameters.

    This gives two basic equations:

    1. Total parameters = dense part + shared experts + all routed experts
    2. Activated params = dense part + shared experts + routed experts selected per token

    Using the figures in this article, the sparsity is roughly 104B ÷ 2800B ≈ 3.7%, meaning each token uses less than 4% of the parameters. Two caveats:

    1. The 3.7% is sparsity “in the average sense.” The true value depends on how large the dense part is; this article does not disclose that figure, so it should not be cited as an exact number.
    2. What is activated is parameters, not compute efficiency. A sparse structure lowers the floating-point operations per token, but it introduces new bottlenecks: memory capacity, communication, and expert scheduling.

    1.2 The Routing Math: What 896-choose-16 Means

    Assuming all 93 layers are MoE layers and temporarily ignoring differences in the routing mechanism, we get the static statistics in Table 1:

    Metric Calculation Result
    Routed experts selected per layer top-16 16
    Expert pool per layer number of routed experts 896
    Per-layer activation ratio 16 ÷ 896 ~1.8%
    Expert instances activated per token 93 × 16 1488
    Shared experts activated per token 93 × 2 186
    Total expert instances in the model 93 × 896 83328

    The technical significance of the routing mechanism lies in the following points:

    • Decoupling of parameter count from compute: 896 experts provide enormous parameter and knowledge capacity, while each token only bears the compute of 16 experts.
    • Specialization: different experts can learn different languages, domains, or modal patterns, alleviating the limited capacity of a single dense network.
    • The cost of scaling capacity: the more experts there are, the harder it is to train routing evenly, and the greater the load skew and communication overhead during inference.

    Choosing only 16 each time from a pool of ~900 experts yields a theoretical combination space of astronomical size. This contrasts sharply with a dense network, where “all parameters participate in the computation of every token.”

    Code Example 1: Illustrative MoE Routing Logic

    1. def moe_layer(x, router, experts, shared, top_k=16):
    2. """
    3. x: [tokens, hidden], where tokens is the number of tokens
    4. Returns: fused hidden states
    5. """
    6. # Routing scores: score each token against each expert
    7. scores = router(x) # [tokens, 896]
    8. top_scores, top_idx = scores.topk(top_k, dim=-1) # keep the top-16 experts by score
    9. weights = torch.softmax(top_scores, dim=-1) # normalize routing weights
    10. +
    11. # Shared experts: every token passes through these
    12. out = shared(x)
    13. +
    14. # Routed experts: grouped by "slot" to form large matmuls
    15. for slot in range(top_k):
    16. tokens = torch.nonzero(top_idx[:, slot]).squeeze(-1)
    17. if tokens.numel() == 0:
    18. continue
    19. w = weights[tokens, slot].unsqueeze(-1)
    20. out[tokens] += w * experts[top_idx[tokens, slot]](x[tokens])
    21. return out

    The above is a simplified illustration: a real MoE layer routes independently at each layer and adds mechanisms such as an auxiliary load-balancing loss and routing noise. In a real inference framework, each token is usually combined via a weighted sum of the 16 experts’ outputs using the corrected routing weights. The illustrative code groups computation by slot to aggregate scattered small matrix operations into large matrix multiplications — the common optimization idea in high-performance MoE inference engines.

    Capacity constraints also matter. Many MoE implementations cap the maximum number of tokens an expert can process in a single forward pass — the expert capacity factor — to keep operator shapes stable across GPUs. The actual number of experts activated per token, the routing scoring method, and capacity configuration should follow the model’s release documentation.

    1.3 The 93-Layer Depth: Routing and the Residual Stream

    MoE layers are generally stacked alternately with attention layers, with information flowing between layers through residual connections. As the layer count grows, the following phenomena appear in sequence:

    • Cumulative routing effect: a single token’s routing combinations across the 93 layers are mutually independent; different layers may route to the same expert or may not overlap at all. The balance of the global routing distribution directly affects inference efficiency.
    • Gains from splitting by layer into a pipeline: many layers mean the model can be cut into segments by layer and distributed across nodes to form pipeline parallelism (PP). The benefit is reduced per-node pressure; the cost is bubbles and extra activation transfers.
    • Long-context stability: the deeper the layers and the longer the context, the harder it is to control the numerical range of intermediate activations, and the risk of low-precision quantization concentrates on a few “outlier” channels.

    1.4 The 100K Context and Native Multimodality

    A context length of 100K means the model can handle long documents, large code-repository snippets, or multi-turn Agent conversation histories in a single request — at the cost of the KV cache growing linearly with sequence length (see Section 2).

    Native multimodality means that encoders such as the vision encoder are jointly optimized with the language backbone in the same training pipeline. This has three implications at the deployment level:

    • You need to load an additional vision encoder and complete image preprocessing, including tiling, scaling, normalization, and so on;
    • Images are converted into visual tokens that enter the language backbone and consume context budget;
    • The vision encoder’s parameter count is relatively small compared with the backbone, but it still imposes requirements on memory and operator compatibility.

    2. 1.56TB and 8 GPUs: A Memory Budget Table

    2.1 What 1.56TB Really Means

    The single figure of 1.56TB alone explains what “local deployment” really means here: at 1TB = 1000GB, it is roughly equal to the combined theoretical memory of 8 high-capacity accelerators with 192GB per GPU. If you were assuming a 4-GPU or 2-GPU local workstation, memory capacity would be physically infeasible. 8 GPUs is the capacity floor, not the performance ceiling.

    Deployment also needs to reserve space for:

    • framework runtime overhead;
    • activations and communication buffers;
    • the KV cache;
    • the vision encoder;
    • memory fragmentation.

    As a result, the actually usable memory is often only 85%–92% of the total.

    Which precision does 1.56TB correspond to? Worth asking. Comparing common storage schemes:

    • 2.8T parameters at 16-bit precision need about 5.6TB;
    • at 8-bit (FP8), about 2.8TB;
    • at 4-bit, theoretically about 1.4TB; after adding the scale factors and metadata needed for group quantization, around 1.5TB is one reasonable explanation.

    Another possibility is that the figure reflects the size of a specific distribution’s weights. Either way, the exact precision and weight size should follow the official model documentation. What this number means for selection: single-node 8-GPU deployment basically corresponds to 4-bit-level weight quantization, or a special model with larger capacity; FP8 weights would require at least a dual-node 16-GPU setup.

    2.2 Memory Budget: Capacity Is the Overall Constraint

    The memory budget can be calculated with the following formula:

    1. Per-GPU memory demand = weights / number of GPUs
    2. + (activations + runtime overhead) / number of GPUs
    3. + KV cache borne by this GPU
    4. + vision encoder and preprocessing buffers borne by this GPU
    5. + safety margin

    For a single-node 8-GPU setup: the weight portion is about 195GB per GPU, which already exceeds 192GB. The space left for the KV cache, runtime, and activations can only be squeezed out through quantization, optimizer-state offloading, and similar means — the margin is very tight.

    KV cache accounting. The KV cache size can be calculated as follows:

    1. KV bytes = 2 × layers × KV heads × per-head dim × sequence length × bytes per element × concurrent requests

    Here, the factor of 2 corresponds to Key and Value respectively. Using 93 layers, 8 KV heads, and 128 dims per head as an example (illustrative only):

    • At FP8 precision, each token needs about 190KB;
    • a 128K session takes about 24GB;
    • if supporting 8-way concurrency, the KV cache alone needs about 190GB, not counting the weights.

    After quantizing the KV cache to FP8, it is about 94GB — still considerable, so memory planning must list it separately.

    Code Example 2: Memory Budget Calculation Script

    1. def memory_budget(total_params=2.8e12,
    2. quant_bytes=0.5, # effective bytes per param for 4-bit weight quantization
    3. layers=93,
    4. kv_heads=8,
    5. head_dim=128,
    6. kv_bytes=1, # KV cache quantized to 8-bit
    7. max_len=128 * 1024,
    8. concurrency=4,
    9. gpus=8,
    10. usable_ratio=0.90,
    11. runtime_gb=12):
    12. """Estimate memory requirements for a single-node deployment (example params, replace with real config)"""
    13. # 1) Weights: total params × bytes per param
    14. weight_gb = total_params * quant_bytes / 1e9
    15. +
    16. # 2) KV cache: per-request KV × concurrency
    17. kv_per_token = 2 * layers * kv_heads * head_dim * kv_bytes
    18. kv_gb = kv_per_token * max_len * concurrency / 1e9
    19. +
    20. # 3) Per-GPU demand: weight share + KV share + runtime overhead
    21. per_gpu = (weight_gb + kv_gb) / gpus + runtime_gb
    22. per_gpu_usable = 192 * usable_ratio # 192GB per GPU, 90% usable
    23. +
    24. print(f"Total weights : {weight_gb:,.0f} GB")
    25. print(f"Total KV cache : {kv_gb:,.1f} GB")
    26. print(f"Per-GPU demand : {per_gpu:,.1f} GB")
    27. print(f"Per-GPU usable : {per_gpu_usable:.1f} GB")
    28. print("Memory verdict :", "fits" if per_gpu <= per_gpu_usable else "exceeds capacity")
    29. +
    30. +
    31. memory_budget()

    With the example parameters, the output is: weights ~1400GB, KV cache ~94.9GB, per-GPU demand ~198.7GB, per-GPU usable 172.8GB, verdict “exceeds capacity.” So 4-bit weight quantization on 8 GPUs with 192GB each is still not enough to support 128K context and 4-way concurrency. Feasible adjustment directions include: reducing context to 32K, or concurrency to 1, or switching to 8-bit KV cache, or scaling to 16 GPUs.

    2.3 Compute Budget: Bandwidth Is the Real Wall

    The baseline for estimating MoE inference compute is the activated parameters, not the total. Generating one token requires roughly 2 × 104B ≈ 0.21 TFLOPs of floating-point operations in the forward pass — a perfectly acceptable amount of compute.

    The difficulty is that the weight-reading volume corresponding to these 0.21 TFLOPs is constrained by memory bandwidth during the decoding stage.

    According to the roofline model, judging whether you are compute-bound or bandwidth-bound comes down to comparing two times:

    1. Time lower bound = max(compute / peak FLOPs, data to move / memory bandwidth)

    The following substitution only demonstrates the method:

    • Assume ~8TB/s memory bandwidth per GPU, ~64TB/s across 8 GPUs;
    • a single forward pass on a 64GB working set takes about 1ms;
    • completing ~0.21 TFLOPs of compute at 64 TFLOPs (8 GPUs × 8 TFLOPs) takes only about 3 microseconds.

    The two differ by ~300×, showing that the decoding stage is almost entirely determined by memory bandwidth. This also explains why “running locally” on 8 GPUs often corresponds to only low concurrency: bandwidth is the scarce resource, not compute.

    However, moving only the activated parameters is just a lower-bound estimate. Actual bandwidth overhead includes:

    1. Weight reading: reading the expert weights each GPU is responsible for, layer by layer. During decoding, the weights are read only once to serve the entire batch, so increasing concurrency is the main lever for improving throughput.
    2. KV cache reading: every step must read all historical KV, whose size grows linearly with context length and concurrency. In long-context scenarios (e.g., 128K), KV reading may exceed weight reading.
    3. All-to-All communication: every MoE layer needs to dispatch tokens to the GPUs holding the experts and then collect the results back.
    4. Activations and intermediate buffers: some frameworks use a “weight streaming” strategy, reading on demand from host memory or storage, trading larger capacity for speed at the cost of increased latency.

    Conclusion: the inference bottleneck for this class of models usually follows the order “KV cache reading → expert communication → weight bandwidth,” rather than floating-point compute. Optimization directions should be prioritized accordingly.


    3. How to Shard on 8 GPUs: Parallelism Strategy Design

    3.1 Parallelism Dimensions Overview

    Within 8 GPUs, the main available parallelism dimensions are:

    • Tensor parallelism (TP): splits each layer’s matrix operations across multiple GPUs horizontally, synchronizing between GPUs via AllReduce; suited to high-bandwidth intra-node interconnect. TP splits KV heads and requires the number of KV heads to be divisible by TP; shared experts and attention heads are split accordingly.
    • Expert parallelism (EP): distributes the 896 experts across 8 GPUs, with each GPU responsible for 112 experts, dispatching tokens via All-to-All. EP is a dimension unique to MoE and the main source of communication overhead.
    • Pipeline parallelism (PP): splits the model by layer; 8 GPUs can be split into 4 or 2 segments, reducing per-GPU pressure but introducing bubbles, which is sensitive to latency.
    • Data parallelism (DP): replicates the model to serve more concurrent requests, but under 8-GPU capacity it is hard to replicate the full model unless further compressed.
    • Sequence/context parallelism (SP/CP): splits the sequence of a long context across GPUs to relieve KV cache pressure; commonly used for long-text tasks.

    Recommended combinations:

    • Single-node 8 GPUs, latency-oriented: TP=8, with EP distributing experts evenly across 8 GPUs. All-to-All occurs only within the high-bandwidth intra-node domain, which is efficient.
    • Single-node 8 GPUs, throughput-oriented: TP=4 × DP=2, but weights double per GPU, requiring more aggressive quantization or offloading; suited to short-context, high-concurrency scenarios.
    • Dual-node 16 GPUs: TP=8 (intra-node) + EP=16 (inter-node). All-to-All crosses machines and must rely on high-speed networking (e.g., ≥200Gbps RDMA); otherwise communication becomes the bottleneck.

    3.2 Expert Parallelism Illustration

    1. GPU0 [experts 0-111] GPU1 [experts 112-223] ... GPU7 [experts 784-895]
    2. │ │ │
    3. └──── each token routed to 16 experts ─────────────┘
    4. │
    5. All-to-All dispatch
    6. │
    7. each GPU computes local experts
    8. │
    9. All-to-All collect back
    10. │
    11. merge by routing weights

    Note that routing is not uniform: hot experts concentrate on a few GPUs, causing “idle GPU / busy GPU” imbalance. Common mitigation includes expert redundancy replication, capacity factor tuning, and dynamic scheduling.

    3.3 Choosing the Sharding Granularity

    With as many as 93 layers, there is extra freedom in sharding:

    • Split by layer: 8 GPUs can be split into 8 segments of about 11–12 layers each, combined with PP for cross-node scaling;
    • Split by attention head: multi-head attention can be split by head count, requiring the number of heads to be divisible by TP;
    • Split by expert: the natural granularity of the EP dimension is the expert; when 896 is not divisible by 8, you need to handle remainder experts or use redundant experts.

    Design principles:

    1. Prioritize completing TP=8 within a single node, keeping All-to-All confined to the high-bandwidth domain;
    2. Align EP scale with the number of GPUs per node, avoiding inter-machine All-to-All;
    3. Make the KV cache sharding method consistent with the paging mechanism actually supported by the inference engine, avoiding “split but unusable.”

    4. Inference Performance: The Keys to Running 2.8T Fast

    4.1 The Difference Between Prefill and Decode

    • Prefill: processes the input prompt; compute-intensive, highly parallel, and mainly compute-bound;
    • Decode: generates token by token; memory-access-intensive, mainly bandwidth-bound.

    The two have different load characteristics; scheduling them together causes interference. Engineering practice commonly uses two approaches:

    1. Continuous batching: new requests are inserted into a batch that is being decoded at any time, improving GPU utilization;
    2. Prefill-decode disaggregation (PD separation): prefill and decode are deployed on separate GPU groups, each optimized independently. A single-node 8-GPU setup can do 4 GPUs for prefill + 4 for decode, at the cost of transferring the KV cache between the two groups.

    4.2 Quantization: The Tradeoff Between Precision and Capacity

    Common quantization schemes compared:

    Scheme Weight size (2.8T) Single-node 8-GPU feasibility Main risk
    16-bit ~5.6TB Not feasible Highest precision
    FP8 ~2.8TB Needs 16 GPUs Long-context numerical stability
    4-bit (W4A16) ~1.4–1.6TB Barely feasible, tight KV budget Expert output outliers, long-text degradation
    4-bit + FP8 KV ~1.4–1.6TB Feasible, requires lower context or concurrency Overall precision drop

    Practical recommendations:

    • Apply group quantization to expert weights, keeping a few high-precision “anchor” channels;
    • Quantize the KV cache to FP8, and protect key tokens using “attention sinks”;
    • After quantization, you must run end-to-end evaluation — you cannot look only at perplexity (PPL).

    4.3 Long-Context Optimization

    Optimization techniques for 100K-context scenarios:

    • Paged KV cache: borrowing the idea of OS virtual memory, split the KV cache into fixed-size blocks allocated on demand to reduce fragmentation;
    • Prefix caching: in Agent scenarios, system prompts and tool definitions are often repeated; caching them significantly reduces prefill overhead;
    • KV quantization and compression: FP8 KV, sliding window, hierarchical caching, etc.; the effect depends on the model structure;
    • Context parallelism: split a long sequence across GPUs to relieve single-GPU KV pressure.

    4.4 The Special Cases of Agents and Multimodality

    Agent scenarios bring extra overhead:

    • Multi-turn tool calls: each turn resends the full history, and the KV cache keeps growing;
    • Multimodal inputs: image token counts often far exceed text; in long-document understanding, visual encoding becomes the bottleneck;
    • Uncontrollable output length: you need to set a max_tokens limit and timeout policy to prevent a single request from dragging down the entire batch.

    Recommended practices:

    • Use prefix caching to fix the system prompt and tool descriptions;
    • Summarize and compress conversation history;
    • Control image resolution and token budget;
    • Rate-limit long-output requests separately.

    5. Engineering Deployment: From Selection to Launch

    5.1 Hardware Selection Checklist

    Item Recommendation Notes
    Per-GPU memory ≥192GB ~195GB per GPU under 4-bit weights, already near the limit
    Inter-GPU interconnect High-bandwidth intra-node interconnect Determines All-to-All efficiency
    Inter-node network High-speed RDMA (≥200Gbps) Required for dual-node deployment
    Host memory ≥1/2 of weight size For weight caching and offloading
    Storage High-speed NVMe, sequential read ≥10GB/s Affects load time
    Power and cooling Designed for 8 GPUs at full load Single-node power draw usually exceeds 10kW

    Weight loading time is also worth watching: 1.56TB of weights takes about 2.6 minutes at 10GB/s sequential read, or 26 minutes at 1GB/s. For inference services that restart frequently, it is recommended to use local NVMe caching or object storage acceleration.

    5.2 Deployment Parameter Example

    1. # Inference service config example (field names are illustrative; naming varies by framework)
    2. model_path: /models/moe-2p8t
    3. quantization: w4a16 # 4-bit weights, 16-bit activations
    4. kv_cache_dtype: fp8 # 8-bit KV cache
    5. tensor_parallel_size: 8 # tensor parallelism, confined to a single node
    6. expert_parallel_size: 8 # expert parallelism, 896/8 = 112
    7. max_model_len: 32768 # set by memory budget, don't blindly open to 128K
    8. gpu_memory_utilization: 0.90 # reserve space for activations and fragmentation
    9. enable_chunked_prefill: true # chunked prefill to reduce long-prompt blocking
    10. enable_prefix_caching: true # prefix caching, clear gains for Agent scenarios
    11. max_num_seqs: 4 # concurrency cap, computed from the KV budget

    5.3 Resource Accounting Table: Three Tiers for Reference

    Config Context Concurrency KV cache Per-GPU demand (est.) Feasibility
    A Conservative 32K 1 ~12GB ~188GB Feasible, small margin
    B Balanced 64K 2 ~47GB ~193GB Needs FP8 KV or lower quantization
    C Aggressive 128K 4 ~190GB ~211GB Needs 16 GPUs or offloading

    (Estimated with 4-bit weights, 8 GPUs, 192GB per GPU, 90% usable; illustrative method only.)


    6. Evaluation and Operations: What to Watch After Launch

    6.1 Performance Metrics

    • TTFT (time to first token): strongly correlated with prefill length and batching strategy;
    • TPOT (time per output token): strongly correlated with bandwidth and KV read volume;
    • Throughput (tokens/s): correlated with concurrency and batching efficiency;
    • Expert load balance: the frequency distribution of experts actually invoked on each GPU, measurable via the Gini coefficient;
    • Memory usage and KV hit rate: determine when to scale out.

    6.2 Observability

    At a minimum, it is recommended to collect the following metrics:

    • per-GPU memory usage, temperature, and power draw;
    • request queue length and queue time;
    • expert routing distribution heatmap;
    • sampled output differences before and after quantization.

    On a cloud platform such as Baidu AI Cloud, weight distribution can rely on object storage, deployment orchestration on a container platform, and runtime monitoring on monitoring/alerting and logging services.

    6.3 Cost and Decision

    • Local deployment: suited to scenarios with high data-compliance requirements, large and stable call volume, and a need for deep customization;
    • Cloud API: suited to teams with fluctuating call volume, rapid validation needs, and limited ops capability;
    • Cost comparison: you should count GPU depreciation, electricity, ops labor, and idle rate into total cost of ownership (TCO), rather than comparing unit price alone.

    7. Common Misconceptions

    1. “2.8T parameters needs 2.8T of compute.” Wrong. 104B is activated; estimate compute from 104B.
    2. “8 GPUs is enough.” Capacity is enough, margin is tight. 128K context and high concurrency need more GPUs or more aggressive optimization.
    3. “4-bit quantization is lossless.” MoE is more sensitive to quantization; expert output distributions vary widely, so end-to-end evaluation is mandatory.
    4. “Local deployment is always cheaper.” At low utilization, on-demand cloud is often more cost-effective.
    5. “Fewer activations means fast single requests.” Decode is bandwidth-bound; single-request latency is strongly correlated with bandwidth contention from concurrency.

    Conclusion

    The open-sourcing of this kind of trillion-scale MoE model pushes “ultra-large-scale models” from the cloud API to the doorstep of private deployment, but the barriers remain clear:

    • Capacity ledger: 1.56TB of weights makes 8 GPUs the floor, with 4-bit quantization the prerequisite for single-node feasibility;
    • Compute ledger: 104B activations make compute manageable, while bandwidth is the decode bottleneck;
    • Engineering ledger: TP/EP sharding, KV cache, quantization strategy, and inference scheduling together determine actual performance.

    For developers, reading the parameter ledger first, then doing the memory budget, and finally choosing the parallelism strategy, is the shortest path to avoiding “buying the wrong GPUs, being unable to run it, and being unable to tune it well.”