Ultra-Large-Scale MoE Models: Architecture Choices and System Optimization

    This article explains how to evaluate ultra-large-scale MoE models and deploy them efficiently. It covers two common questions about lightweight model versions and long-context behavior, four practical dimensions for assessing top-tier model capability, and system-level optimization topics such as attention cost, kernel fusion, communication overlap, and load balancing. It also provides a pre-deployment checklist covering request scale, GPU memory, scaling, model loading, cache hit rate, communication overhead, cost, data security, and rollback.

    I. Two Common Questions to Clarify First

    1. Are Smaller Versions Distilled, or Independently Trained?

    The industry often releases large versions and small-to-medium versions for different scenarios at the same time. Many people assume that smaller versions are distilled from the larger version. The actual situation should be based on the publisher’s technical report.

    One reported flagship MoE generation has about 1.6T total parameters and about 49B activated per inference; its lightweight variant has about 284B total parameters and about 13B activated. If the two are independently pre-trained, the lightweight version is not constrained by the performance ceiling introduced by distillation and can make fuller use of sparse structure under similar compute. These figures are taken as reported and have not been individually verified here. Before selecting a model, confirm the version number, the parameter counting scope (for example, whether shared experts and embedding layers are included), and the training setup.

    2. Is Long Context a Default Capability, or a Feature That Must Be Enabled?

    Early services often treated long context as an add-on feature. Users needed to explicitly enable it when calling the API, and the server side sometimes deployed separate long-text and short-text models. Some recent models provide a 1M-token context as a default capability, and inference services allocate resources dynamically based on request length. For deployment teams, this can reduce the work of maintaining two sets of services. However, resource usage is also harder to estimate. A very long request will occupy a large amount of KV Cache and may consume GPU memory that would otherwise be used by other requests in the same batch.

    Before launch, confirm three things: what the default length boundary is, whether requests beyond the boundary are billed or rate-limited, and whether the API supports explicitly disabling the feature.

    II. How to Judge Whether a Model Reaches the Top Tier

    Parameter scale alone cannot show model capability. It is better to verify from four dimensions and test with your own business data whenever possible.

    1. Coding capability: Can the model complete modifications under cross-file dependencies and pass the project’s existing tests?
    2. Mathematical and logical reasoning: Accuracy and stability on multi-step derivation problems. A single correct answer is not enough; sample multiple times and calculate statistics.
    3. Tool calling: Can the model generate calls according to the parameter format defined by the tool and maintain consistent state across multi-turn interactions?
    4. Long-document retrieval: Place key information in the middle of a long document for testing. Testing only the beginning and end positions can easily overestimate retrieval capability.

    Claims that open-source models are “close to closed-source flagships” require specific evaluation sets, scores, model versions, and test dates. Without this information, it is not appropriate to draw conclusions from such claims.

    III. Technical Points for System-Level Optimization

    1. Computational Cost of Attention

    The compute of standard self-attention scales quadratically with sequence length. At the million-token level, this overhead is difficult to sustain. A common practice is to combine multiple attention mechanisms: sliding-window attention handles local information, while sparse attention or global attention handles long-range dependencies. At the same time, KV Cache is quantized or compressed to reduce GPU memory usage. KV Cache reads and writes are one of the main memory-access pressures in long-sequence inference; compression can reduce GPU memory bandwidth consumption. However, accuracy loss must be evaluated separately on the target task and should not be assumed to be lossless.

    2. Kernel Fusion and Communication Overlap

    MoE routing and expert computation produce many small matrix operations and memory reads and writes. If the work relies entirely on framework-generated kernels, the number of kernel launches is high and memory-access overhead is large. Therefore, performance-sensitive scenarios often use custom kernels for routing, token reordering, and expert computation, and overlap All-to-All communication with computation. Tensor Cores handle matrix multiplication and similar computation, while data moves across the GPU memory hierarchy (registers, shared memory, L2 cache, and HBM). The two must work together for fused kernels to achieve good throughput.

    The pseudocode below only illustrates the flow and cannot be run directly:

    1. # Illustrative pseudocode: shows the flow, not directly runnable
    2. def moe_forward_sketch(x, router, experts, top_k=2, capacity_factor=1.25):
    3. # 1. Routing: select top_k experts and weights for each token
    4. logits = router(x)
    5. topk_idx, topk_w = select_topk(logits, k=top_k)
    6. # 2. Reorder tokens by expert; tokens exceeding capacity are dropped or sent through the residual according to policy
    7. dispatched, meta = dispatch_with_capacity(x, topk_idx, capacity_factor)
    8. # 3. Start All-to-All asynchronously; compute local experts on this GPU while waiting
    9. handle = all_to_all_dispatch_async(dispatched)
    10. local_out = experts.run_local(dispatched, meta)
    11. remote_in = handle.wait()
    12. remote_out = experts.run_remote(remote_in, meta)
    13. # 4. Merge local and remote results, then weight by routing weights
    14. combined = merge(local_out, all_to_all_combine(remote_out, meta), meta)
    15. return weighted_sum(combined, topk_w, meta)

    Fusion and communication overlap can reduce kernel launches and memory accesses, but they do not guarantee speedup. The benefit depends on batch size, the number of experts, and network topology. Use profiling tools such as Nsight Systems to identify the bottleneck before deciding whether custom development is worth the investment.

    3. Load Balancing

    Uneven expert load can lead to “expert collapse,” where a small number of experts handle most requests and become a computational bottleneck. During training, auxiliary loss functions are usually used to constrain the routing distribution. During inference, expert placement or the number of replicas can be adjusted based on real-time load on each GPU. Such adjustments require continuous monitoring of the number of tokens processed by each expert and the waiting time on each GPU. Thresholds should be set conservatively to avoid extra overhead caused by frequent migration.

    IV. Pre-Deployment Checklist

    Taking 1.6T parameters as an example, FP8 weights require about 1.6TB, and BF16 weights require about 3.2TB. This already exceeds the common GPU memory capacity of a single machine, so multi-node parallel deployment is usually required. Beyond weights, KV Cache and activations also consume GPU memory. The following checklist can be used before launch.

    Checklist item What to confirm
    Request scale Peak QPS, P95 and P99 request lengths, number of concurrent sessions
    GPU memory capacity Weight footprint; KV Cache footprint estimated from maximum concurrency and maximum length; reserved buffer space
    Scaling Cold-start time to serving; scale-out threshold; cool-down time for scale-in
    Model loading Weight size; storage throughput; cache warm-up method. Use your own measured load time; do not copy others’ numbers
    Cache hit rate Actual prefix-cache hit rate and its impact on time to first token
    Communication overhead All-to-All time as a share of per-step time
    Cost Cost per million tokens, calculated from node-hours and actual throughput
    Data security Storage location, retention period, and access permissions for request content and logs
    Rollback plan Whether old and new models can run in parallel; concrete switch and rollback steps

    Stress testing should cover the metrics above. At launch, canary a portion of real traffic, confirm that all metrics are stable, and then switch all traffic. Container instances, object storage, and monitoring services on cloud platforms can be selected based on the team’s existing environment. When selecting, compare GPU models, inter-node network bandwidth, billing models, and operations costs.

    Selecting ultra-large-scale MoE models requires considering model architecture, long-context behavior, low-level kernels, and deployment cost at the same time. Rather than relying on a single parameter count or leaderboard score, test the metrics above item by item with your own workload.