Deploying a 2.8T Parameter MoE Model with 1M-Token Context on Two Domestic AI Accelerator Servers

    This article documents a practical deployment of a 2.8T-parameter Mixture-of-Experts model with up to 1M-token context on two domestic AI accelerator servers. It covers memory budgeting, W4A8 quantization, TP16 x PP2 parallelism, weight distribution, version pinning, multimodal validation, long-context stress testing, performance analysis, troubleshooting, and acceptance criteria. It is intended for engineers deploying extremely large MoE models under tight hardware, memory, interconnect, and software-stack constraints.

    1. Background and Goals

    Running ultra-large MoE models as production services on high-end GPUs is often limited mainly by software adaptation. On domestic AI accelerator platforms, additional constraints appear simultaneously: memory capacity, inter-die interconnect, operator ecosystem, and quantization formats. As a result, deployment becomes closer to a systems-engineering problem.

    The model in this article is a native multimodal MoE model with:

    • Total parameters: 2.8T
    • Activated parameters per token: about 104B
    • Maximum supported context length: 1M tokens

    The deployment layout is as follows:

    • Hardware: 2 domestic AI accelerator servers, each with 16 compute dies. Each die has 64 GiB of memory, for a total of 32 dies and 2 TiB of memory.
    • Software: community-published W4A8 quantized weights, about 1.47 TB in total. The inference image is provided by the community alongside the model.
    • Parallelism: TP16 within each node, PP2 across nodes, and a world size of 32.

    Key conclusions:

    1. Memory is the first constraint. W4A8 reduces the weight footprint to about 1.37 TiB, roughly half of BF16, which makes deployment possible when a single server cannot hold the model.
    2. The parallel topology must match the interconnect hierarchy. Keeping TP inside a node and PP across nodes avoids placing high-frequency collective communication on inter-node links.
    3. Weight distribution is often the most time-consuming preparation step. For the same 1.47 TB weight set, direct node-to-node transfer was about 9 times faster than having each node download from the public network.
    4. Long-context stress testing must include long-input scenarios. Testing only short requests cannot expose risks related to KV cache capacity or time to first token.

    The measurements in this article come from our own testing and deployment records. Values such as memory usage, pipeline bubble ratio, and bandwidth limits are estimates based on publicly known order-of-magnitude relationships and are noted as such in the text. Actual results should be confirmed through stress testing.

    2. Pre-Deployment Analysis: Understand the Constraints First

    2.1 Model Side: Parameter Count, Activation Volume, and Context Length

    • Total parameters determine the lower bound of memory usage. Under W4A8, 2.8T parameters at 4 bits per parameter require about 1.4 TB in decimal terms. Adding quantization scaling factors and other metadata brings the actual weight footprint to about 1.47 TB. Under BF16, the model would exceed 5 TB.
    • Activation volume determines compute and bandwidth demand. About 104B parameters participate in the forward pass for each token, corresponding to roughly 0.21 TFLOP using an estimate of 2 floating-point operations per parameter. This is why MoE inference is often described as: memory capacity depends on total weights, while compute depends on activated parameters.
    • Context length determines KV cache and attention overhead. Using standard MHA as an estimate, the KV cache per 1K tokens is approximately:

      2 × number of layers × number of KV heads × head dimension × bytes per element KB.

      If the model uses a low-rank KV compression structure, the per-token footprint can be significantly smaller. The actual configuration in the weights must be used for calculation. Whether long inputs such as 80K or 200K can be served stably depends heavily on this budget.

    2.2 Hardware Side: Memory Is a Hard Constraint; Interconnect Is Layered

    The two nodes provide 2 TiB of total memory. At first glance, this appears sufficient for a 1.37 TiB weight footprint, but in practice the deployment is close to the limit:

    Item Quantity Notes
    Weights about 1,366 GiB 1.47 TB ÷ 32, about 42.7 GiB per die on average
    Remaining space about 682 GiB about 21 GiB per die on average
    Must be covered KV cache, activations, communication buffers, framework overhead, and fragmentation KV cache becomes the dominant item in long-context scenarios

    Interconnect is also layered:

    • Within a node, inter-die links provide high-speed coherent interconnect suitable for collective communication such as TP, which is executed at every layer.
    • Across nodes, communication depends on the parameter-plane network, which generally has higher latency and is more suitable for point-to-point transfers between adjacent PP stages.

    2.3 Two Implicit Constraints

    • Storage. Each node needs at least about 1.47 TB of space for weights, plus extra capacity for temporary verification files and logs.
    • Preparation time. Downloading weights from the public network and pulling images may take several hours and requires ongoing operational attention. This should be included in the launch plan.

    3. Parallel Strategy: Why TP16 x PP2

    3.1 Two Ways to Partition the Model

    • TP, or tensor parallelism, splits the matrices of each layer across multiple devices. For every token and every layer, collective communication is usually required, making TP highly sensitive to bandwidth and latency.
    • PP, or pipeline parallelism, partitions the model into multiple stages by layer. Between adjacent stages, activations are transferred once per iteration, so communication volume is relatively small. However, PP is sensitive to load balancing and micro-batch scheduling.

    Keeping TP inside a node and placing PP across nodes means that operations with frequent communication use high-bandwidth links, while operations with small communication volume use inter-node links.

    3.2 Why Not Use TP32

    Using TP32 across nodes would move per-layer collective communication onto inter-node links. Inter-node latency is typically at least one order of magnitude higher than intra-node latency, which can degrade both average step latency and tail latency. In addition, MoE expert routing may cause load imbalance across dies, amplifying synchronization waits.

    If the inter-node links include high-performance RDMA networks, such as 400G-class infrastructure, cross-node TP may be technically feasible. However, the validated configuration in this article uses intra-node TP as the baseline. The lower the inter-node link bandwidth, the more necessary this choice becomes.

    3.3 Die-Level Parallelism and the Cost of PP

    • Die-level parallelism. One die corresponds to one parallel rank. The 32 dies map exactly to TP16 x PP2. Kernels, memory allocation, and debugging are all performed at die granularity, so there is no need to separate physical cards from logical ranks when diagnosing issues.
    • Pipeline bubbles. The steady-state bubble ratio is approximately (p - 1) / m. In this case, with p = 2, the bubble ratio is about 12.5% when m = 8, and about 25% when m = 4. This can be mitigated by increasing the number of micro-batches or enabling continuous batching within requests.
    • Pipeline imbalance. Long-context prefill and decode can enter scheduling in an interleaved manner, causing the two stages to be unevenly busy. Batch parameters should be tuned based on measured behavior.

    4. Software Stack and Version Pinning

    Component Configuration in This Deployment Reason for Pinning
    Quantized weights Community W4A8 weights, about 1.47 TB Includes calibration results; changing the revision may change outputs
    Inference image Community image released with the model The model architecture, quantization kernels, and driver/firmware versions are tightly coupled
    • Pin the image by digest. The template should pin the image digest, such as a sha256 checksum, rather than a floating tag. Tags can be overwritten, while a digest ensures that different nodes pull exactly the same content.
    • Verify weights by version and manifest. Record the model version identifier, the 346 safetensors shards, and the total byte count as a verification basis.
    • Keep driver and firmware versions consistent across nodes. Otherwise, an individual node may fail to join the communication domain due to version differences.

    A reusable verification method is shown below:

    1. # 1. Verify the number of shards
    2. ls /data/models/<model-dir>/*.safetensors | wc -l # Expected: 346
    3. # 2. Verify the total byte count against the recorded manifest
    4. du -sb /data/models/<model-dir>

    5. Environment Preparation: Nodes, Network, and Weights

    5.1 Node Onboarding: Heterogeneity Is Not an Exception

    GPU nodes and domestic accelerator nodes follow the same onboarding process:

    1. Generate an installation command from the platform under “Compute Nodes -> Add Node” and run it on the target node.
    2. A persistent agent initiates an outbound connection to the server and establishes a tunnel. Control, monitoring, logging, and inference traffic reuse this tunnel.
    3. When the node comes online, it reports the number of accelerators, memory capacity, network interfaces, and storage information.

    The value of unified onboarding is:

    • One orchestration, monitoring, and logging system can manage heterogeneous resources.
    • There is no need to maintain a separate operations channel for domestic accelerators.
    • Inference traffic does not require additional inbound ports to be opened, which improves security.

    5.2 Parameter Network: Build the Communication Plane Correctly

    In the “Network” section, add the inter-die interconnect of both nodes to the same parameter network. The platform performs inter-card connectivity checks and automatically matches nodes during deployment. This ensures that:

    • Both the TP communication domain and the cross-node PP links use the expected paths.
    • When multiple NICs or network types are present, control traffic and parameter traffic are not mixed.

    5.3 Weight Distribution: Do Not Download from the Public Network Twice

    After the first node downloads the weights from the model repository, the second node does not need to download them again over the public network. Use “Copy to…” to transfer them directly from the first node:

    Method Measured Bandwidth Approximate Time for 1.47 TB
    Public network download, one copy per node 50-57 MB/s 7-8 hours
    Direct node-to-node transfer about 490 MB/s about 50 minutes

    This improves the overall preparation time by nearly 10 times. If shared storage is available, the same weight set can also be mounted on both nodes. The key requirement is to perform file-by-file verification of the complete weight set on the target node.

    6. Launching the Service and Validation

    6.1 Launch Parameters

    The following parameters are illustrative. The key names are meant to convey meaning only:

    1. # Illustrative service launch parameters; use the actual parameters of the inference framework
    2. weight_path: /data/models/<model-dir>
    3. tensor_parallelism: 16 # Intra-node, corresponding to 16 dies per node
    4. pipeline_parallelism: 2 # Across nodes
    5. quantization: w4a8 # Must match the weights
    6. max_context_length: set according to the range supported by the weights
    7. chunked_prefill: true # Controls peak memory usage and queue impact for long-input prefill
    8. max_memory_utilization: leave a safety margin # Reserve memory for activations and communication buffers

    6.2 Multimodal Validation

    Multimodal capability cannot be judged only by whether the service starts. At minimum, it should cover three types of requests:

    1. Pure text dialogue: verify basic generation and multi-turn context.
    2. Image and text input: upload an image and ask a question, confirming that preprocessing, visual feature extraction, and fusion with text tokens work end to end.
    3. Tool calling: verify that tool-call structures in model output can be parsed correctly.

    6.3 Stress Test Design

    Stress tests are initiated from a load generator, forwarded through the platform gateway to the inference instance. The tested path includes the gateway, authentication, and streaming forwarding:

    Group Input / Output Tokens Load Characteristics Focus
    Short context random 2048 / 512 Short input and short output Baseline throughput and per-step latency
    Agentic 80K about 80K input Long input, multi-turn tool calls KV cache capacity and time to first token
    Agentic 200K about 200K input Ultra-long context near the current service limit Memory limits, queuing, and stability

    Result: across the three groups, all 836 requests succeeded. Dialogue, reasoning traces, and tool calls behaved normally.

    7. Performance Analysis and Optimization Suggestions

    7.1 Use Roofline Thinking to Identify Bottlenecks

    • Prefill, compute-intensive: each token requires about 0.21 TFLOP. Prefill for a 200K-token request requires about 41.6 PFLOP, shared across 32 dies.
    • Decode, bandwidth-intensive: for each generated token, each die needs to read about 3.25 GB of weights, based on 52 GB ÷ 16, plus KV cache reads. If the memory bandwidth of a single die is B TB/s, the single-request decode upper bound is about B ÷ 3.25 tokens/s. B must be replaced with the actual hardware specification.
    • Long-context variables: KV cache reads grow linearly with context length. In the 80K and 200K scenarios, this portion may approach or even exceed weight reads, causing decode throughput to decrease as context length increases.

    7.2 Optimization Suggestions

    • Chunked prefill: split long prefill into smaller chunks and schedule them together with decode, reducing tail latency per step and peak memory usage.
    • Prefix caching: in agent scenarios, system prompts and tool definitions are often fixed. Reusing prefixes can avoid a large amount of repeated prefill.
    • Timeout settings: time to first token for long inputs is significantly higher than for short requests. Timeout thresholds on the client, gateway, and inference service should be planned consistently.
    • Concurrency control: memory headroom is limited. Limiting maximum input length or concurrency can prevent long-context requests from starving short requests.
    • Batch parameter tuning: adjust micro-batch count and batching parameters based on measured pipeline bubbles and available memory.

    8. Common Troubleshooting

    Symptom Common Causes Recommended Actions
    Weight loading is slow or times out Repeated public network downloads, missing verification Use direct node-to-node transfer; verify before loading
    Initialization hangs while building the communication domain Interconnect not added to the same parameter network, driver version mismatch Check parameter-network connectivity and software versions on all nodes
    Long input triggers OOM Insufficient KV cache budget, chunked prefill disabled Reduce concurrency or maximum input length; enable chunked prefill
    Large variation in time to first token Long-prefill queuing, pipeline bubbles Use prefix caching, chunked scheduling, and batch parameter tuning
    Abnormal output Quantized weights do not match the framework Pin the image by digest; verify the revision and quantization format

    9. Go-Live Acceptance Checklist

    • Node onboarding is complete, and the number of accelerators and memory capacity are correctly recognized
    • Parameter-network connectivity checks pass
    • The number of weight shards and total byte count match the manifest
    • The image is pinned by digest, and driver/firmware versions are consistent across nodes
    • Text, multimodal, and tool-calling requests all work normally
    • Short-context and long-context stress tests meet the success-rate targets
    • Timeout, retry, and concurrency-limit policies are configured

    10. Conclusion

    Deploying a 2.8T-parameter MoE model on 32 dies across two nodes is essentially a systems-engineering process: memory budgeting, parallel topology selection, weight distribution, version pinning, and layered stress testing. W4A8 makes it possible to run the model on two nodes. TP16 x PP2 aligns communication patterns with the interconnect hierarchy. Direct node-to-node transfer reduces preparation time from hours to minutes. The stress test suite, combining short context with two long-context groups, verifies service availability under realistic load.

    This workflow is decoupled from specific hardware and model versions, and can be transferred to similar deployments of ultra-large MoE models on domestic AI accelerators: first calculate memory and communication constraints, then choose the parallel topology and quantization scheme, and finally validate the service with a stress-test set that covers real workload characteristics.