Designing a Trillion-Parameter MoE Model for AI Agent Scenarios

    This article explores the architecture, data, and training strategies behind a recent open-source trillion-parameter Mixture of Experts (MoE) model optimized for AI agent applications. It details how balancing sparsity and computation, synthesizing high-quality agent trajectories, and ensuring training stability enable superior tool-calling and multi-step planning capabilities while managing inference costs effectively.

    1. Background: From “Chatting” to “Doing”

    Over the past two years, large language model evaluations have primarily focused on knowledge QA, mathematical reasoning, and code generation—collectively known as “static intelligence.” However, with the rise of AI agent applications, the industry’s focus is shifting toward the model’s ability to actually “act.” This includes calling external tools, decomposing tasks, formulating multi-step plans, and dynamically adjusting strategies based on execution feedback. These are defined as Agentic capabilities, typically measured by tool-calling success rate, task completion rate, and multi-turn decision quality.

    Recently, an open-source Mixture of Experts (MoE) model with a total of 1 trillion parameters has drawn significant attention. Among non-chain-of-thought models, it achieved leading performance on benchmarks for frontier knowledge, math, and code. More importantly, it significantly outperformed general-purpose models of similar scale in tool-calling and agent decision-making metrics, approaching the levels of top closed-source frontier models considered strongest in agent scenarios. This article deconstructs the key advantages of this model’s framework design from a neutral technical perspective.

    2. Architecture: Balancing Sparsity and Computation

    2.1 Scaling Experts to 1 Trillion Parameters
    The model follows the mainstream MoE architecture. Compared to the previous generation of similar open-source models, the main change is an increase in the number of experts from 256 to 384, boosting total parameters from approximately 671B to 1T. Expanding the expert pool allows the model to partition knowledge and capabilities at a finer granularity. Different experts can specialize in distinct domains (such as tool-calling protocols, API semantics, code syntax, or mathematical derivations), forming a more precise “on-demand activation” during routing. This is the core advantage of sparse architecture in capability coverage.

    2.2 Halving Attention Heads for Long Contexts
    A notable design trade-off is reducing the number of MLA (Multi-head Latent Attention) heads from 128 to 64. For agent scenarios, this is a highly pragmatic modification. Agent task contexts are often extremely long—comprising system prompts, tool descriptions, conversation history, and tool return results, frequently reaching tens of thousands or even hundreds of thousands of tokens. Since attention computation costs scale with sequence length, reducing the number of heads directly compresses compute and memory overhead for long sequences, lowering the barrier for high-frequency long-context reasoning in agent applications.

    2.3 Simplifying Dense Layers and Controlling Active Parameters
    Regarding layer structure, only the first layer of this model uses a dense design, whereas previous similar architectures typically retained dense layers in the first three layers. Fewer dense layers mean a higher degree of sparsity and fewer parameters activated per token during forward computation. The combined effect is that, despite reaching 1T total parameters, the actual activated parameters are only about 32B, down from the 37B of the previous generation. Active parameters are a decisive factor in inference cost; lower activation means higher throughput or lower per-request cost on equivalent hardware. This approach of “scaling total parameters up while keeping active parameters down” represents the fundamental economic advantage of sparse MoE architectures over dense ones.

    3. Data and Training: Sourcing Agent Capabilities

    Architecture is merely the container; true agent capabilities stem from data and training strategies.

    3.1 Agent-Oriented Data Synthesis
    The model team built a data synthesis system covering four dimensions:

    • Diversity: Synthetic tasks cover a wide range of tool types, API forms, and task structures to avoid overly narrow capability scopes.
    • Scalability: The synthesis process can be parallelized at scale to ensure an adequate supply of trajectory data.
    • Authenticity: The synthetic environment closely mimics real tool behaviors and execution feedback, reducing the distribution shift between synthetic data and real deployment.
    • Interactivity: Tasks feature multi-turn interaction, requiring the model to revise plans based on feedback during execution.

    Through this system, the model continuously acquires high-quality agent trajectory data. The quality, quantity, and variety of these trajectories collectively determine the model’s ceiling in tool-calling and planning tasks.

    3.2 Training Stability Optimization
    A major challenge in training ultra-large MoE models is stability. The model employs a targeted design in its training optimizer (using an improved momentum optimizer scheme combined with constraints on attention output magnitude) to mitigate loss spikes caused by logit mutations during training. For developers, this highlights an engineering reality: training a trillion-parameter model is not just about scaling GPUs; it is fundamentally about numerical stability and optimization algorithms.

    3.3 Training Corpus Scale
    The pre-training corpus saw a modest increase from approximately 14.8T tokens in the previous generation to 15.5T tokens. This indicates that, given similar architectures, progress on the training side is driven more by data quality, composition ratios, and the proportion of synthetic data tailored for agent capabilities, rather than a pure scale race.

    4. Inference Cost: A Deployment Perspective

    For application developers, the cost model is equally critical:

    • Large-scale cluster deployment: If deployed on a cluster of over 128 GPUs using mature industry inference optimization techniques (such as large-scale parallelism, Prefill-Decode separation, and MTP speculative decoding), the inference cost of this model can be on par with previous flagship open-source models. This is attributed to its higher sparsity and lower active parameters.
    • Small-scale deployment: If deployed on a 16-GPU setup while pursuing low latency (low Time Per Output Token, TPOT), the cost will be relatively higher due to structural differences.

    This suggests a universal engineering principle: the economic dividends of sparse large models can only be fully realized at sufficient deployment scales. Small to medium-scale deployments require more nuanced trade-offs between precision, latency, and cost. In practical engineering, overall TCO (Total Cost of Ownership) should be optimized holistically by integrating KV cache management, request batching strategies, and elastic scaling via container platforms and monitoring systems.

    5. Conclusion

    The technical approach represented by this open-source trillion-parameter model demonstrates that a clear methodology is forming for designing models tailored for agent scenarios. Architecturally, it expands the expert pool to raise the capability ceiling while simplifying attention heads and dense layers to compress activation costs. Data-wise, it relies on a multi-dimensional synthesis system to construct high-quality agent trajectories. In training, stability optimization ensures the convergence of ultra-large models. For developers planning to build agent applications, understanding these design trade-offs—especially the interplay between sparsity, long-context costs, and deployment scale—will help them make more rational decisions during model selection and deployment.