Technical Breakdown and Engineering Practices of Large-Scale MoE Models

    This article breaks down how sparse activation in Mixture of Experts (MoE) architectures decouples total parameters from activated parameters, using a 671B-total/37B-activated open model as a reference. It covers the core routing mechanism, a four-layer method for estimating compute and training budgets, the three levers behind faster generation, multi-platform deployment considerations, version and context-length evolution, capability boundaries in math and Chinese tasks, and a practical deployment checklist for teams working under compute constraints.

    1. Why Sparse Activation Matters

    In late December 2024, an open-source large language model with roughly 671 billion total parameters and about 37 billion activated parameters per token came into public view. Its pretraining corpus was around 14.8 trillion tokens, and training used only about 2,048 accelerators for a cumulative total of roughly 2,788 thousand accelerator-hours (about 2,664 thousand accelerator-hours for pretraining). That works out to about 1,361 hours per card, or roughly 56.7 days, with a development cost of about $5.576 million.

    These numbers are worth studying not because they are “cheap,” but because they put an engineering problem on the table: how to achieve capabilities close to first-tier closed models under a limited compute budget.

    The answer is sparse activation from a Mixture of Experts (MoE) architecture. Understanding this is the prerequisite for all later deployment, tuning, and cost estimation.

    2. Core Mechanism: Decoupling Total and Activated Parameters

    In a traditional dense model, every token passes through all parameters during the forward pass, so parameter count and compute are roughly linearly coupled. MoE splits the feed-forward layer into multiple parallel “expert” networks, and a gating network (Router/Gating) selects a few experts for each token.

    This produces two key metrics:

    • Total parameters: determine the upper bound of the model’s knowledge capacity, about 671 billion;
    • Activated parameters: determine the actual compute cost per token, about 37 billion.

    The direct consequence of this decoupling is that memory usage is determined by total parameters, while inference compute (FLOPs) and throughput are determined by activated parameters. Capacity planning must therefore be done separately for each. This is the root cause of many teams seeing “enough memory but low throughput” or “enough compute but it does not fit” after launch.

    The gating mechanism is typically paired with a load balancing loss to prevent a few experts from being over-selected while the rest are “starved.” Illustrative pseudocode:

    1. # Illustrative flow of gating and sparse activation (pseudocode)
    2. logits = router(hidden_states) # [tokens, num_experts]
    3. weights, expert_ids = topk_softmax(logits, k=2)
    4. output = zeros_like(hidden_states)
    5. for e in selected_experts(expert_ids):
    6. mask = (expert_ids == e)
    7. output[mask] += weights[mask] * expert_e[hidden_states[mask]]
    8. output += shared_expert(hidden_states) # shared expert carries general knowledge

    There are three engineering points. First, routing decisions should align with compute scheduling to avoid unnecessary token movement across devices. Second, under Expert Parallelism, cross-device all-to-all communication easily becomes a bottleneck. Third, the division of labor between shared experts and routed experts affects the balance between general and specialized capabilities.

    3. How to Estimate Compute Budget and Training Cost

    The publicly available cost structure can be abstracted into a general estimation formula for budget planning:

    1. Total accelerator-hours = number of cards × hours per card
    2. Hours per card ≈ 2,788,000 / 2,048 ≈ 1,361 hours ≈ 56.7 days

    It is important to stress that “development cost” and “compute cost” are not the same thing. The former usually also includes data cleaning and mixing, algorithm iteration, failed experiments, labor, and cluster redundancy overhead; the latter is only the observable accelerator-hour consumption. For technology selection, split the budget into four layers:

    1. Data layer: compute for corpus collection, deduplication, quality filtering, and mixing experiments;
    2. Training layer: accelerator-hours for main training and ablation experiments;
    3. Inference layer: always-on compute after launch plus elastic peaks;
    4. Operations layer: monitoring and alerting, logging services, failover, and capacity redundancy.

    A common mistake is budgeting only for main-training accelerator-hours, then overspending badly on data mixing and inference peaks.

    4. Inference Performance: Three Levers Behind Faster Generation

    Compared with the previous generation, this class of model shows roughly a 3x improvement in generation speed. The gain usually comes from stacking three types of techniques rather than a single optimization:

    • Sparse activation itself: activated parameters are far smaller than total parameters, lowering per-token compute;
    • Batching and scheduling optimizations: continuous batching and paged KV cache management significantly improve GPU utilization;
    • Quantization and operator fusion: reducing the bit width of weights and cache within acceptable accuracy to cut memory-access pressure.

    The practical recommendation is layered stress testing: first measure single-request time to first token (TTFT), then throughput (tokens/s) and the memory curve under long contexts. For long-context scenarios, pay special attention to the linear growth of the KV cache, and enable cache reuse and prefix sharing when necessary.

    5. Multi-Platform Deployment and Ecosystem Adaptation

    After launch, this model became available through one-click deployment or API access on several cloud model marketplaces, AI compute platforms, and domestic accelerator communities, supporting both public cloud online access and private deployment. For developers, selection should focus on four general dimensions:

    1. Delivery form: public cloud APIs suit rapid validation; private deployment suits scenarios where data cannot leave its domain;
    2. Compute adaptation: different accelerators vary significantly in all-to-all communication and operator support for MoE, so compatibility must be verified first;
    3. Observability: whether unified logging, monitoring and alerting, and tracing are integrated;
    4. Elasticity: whether container platforms and message queues can be used to smooth peaks and fill valleys.

    On Baidu AI Cloud, this kind of sparse model can typically be orchestrated with a container platform, with object storage holding model weights and datasets, and a monitoring and alerting system tracking throughput and latency metrics to form a complete launch loop.

    6. Version Iteration and Context Capability Evolution

    Public information shows the model went through several minor upgrades and generational iterations: a parameter and inference optimization minor version in March 2025, an architecture and capability upgrade in August, further iteration in December, context length extended to about 1 million tokens in February 2026, and a subsequent generation in April. This path reveals two trends:

    • Fragmented iteration cadence: minor versions fix inference and alignment issues, major versions upgrade architecture and capabilities, so teams need to bind model versions to business regression tests;
    • Context as a first-class citizen: million-level context is a qualitative change for retrieval augmentation, long-document understanding, and code-base-level analysis, but it also raises memory and scheduling demands.

    7. Capability Boundaries: Why Math and Chinese Tasks Stand Out

    Public evaluations show this class of model performs relatively strongly on math reasoning and Chinese tasks, close to first-tier models of the same period. The reasons can be summarized as optimized mixing of high-quality Chinese and math/code corpora, construction of chain-of-thought data, and specialized capacity from expert division of labor. Developers should match tasks accordingly: Chinese content production and math/code assistance can be tried first; for highly time-sensitive or compliance-heavy scenarios, external retrieval and rule-based validation are still needed.

    8. Deployment Checklist

    • Run small-scale compatibility validation before any full migration;
    • Plan memory by total parameters, stress-test throughput by activated parameters;
    • Split the budget into four layers: data, training, inference, and operations;
    • Bind model versions to the evaluation set for regression;
    • Design caching and retrieval strategies early for long-context scenarios;
    • Instrument logging, monitoring, and alerting across the full stack to avoid blind spots after launch.

    The value of sparse models lies not in how large the parameter count looks, but in re-balancing “capability” against “cost.” Mastering this estimation and deployment method is what enables rational technical choices under budget constraints.