Architecture and Practices of Large-Scale Mixture of Experts Language Models
This article explores the architecture and practical implementation of large-scale Mixture of Experts (MoE) language models. It covers the technical background, working mechanisms of the MoE architecture, training scale, cost analysis, model capabilities, deployment strategies, and key engineering practices essential for enterprise applications. By balancing model capacity with computational efficiency, MoE models present a significant trend in the evolution of large language models.
I. Model Positioning and Technical Background
The model belongs to the Mixture of Experts (MoE) route within large language models, with its first public version released in December 2024. Unlike traditional dense models, MoE models possess a massive total parameter count but do not activate all parameters for every input token. Instead, a routing mechanism selects a small number of expert networks to participate in the computation.
The core value of this design lies in retaining a large knowledge capacity while controlling the actual computational load per token. In other words, the total parameter count primarily determines the knowledge the model can store and express, while the activated parameter count more directly affects the computational cost, memory usage, and response speed during inference.
According to public information, the model has a total of approximately 671 billion parameters, with around 37 billion parameters activated per token. It was pre-trained on about 14.8 trillion tokens. This scale equips it with strong capabilities in language understanding, knowledge QA, code generation, mathematical reasoning, and Chinese processing, reflecting the current trend of large models evolving from a single dense architecture to a sparse computation architecture.
II. Working Mechanism of the MoE Architecture
A typical MoE layer consists of a router and multiple expert networks. After the input passes through the router, the system selects one or more best-matching experts based on token features. Only the selected experts participate in the subsequent feedforward computation, while others remain inactive.
The process can be abstracted as:
Input Token↓Router calculates expert scores↓Select Top-K experts↓Expert networks process individually↓Combine outputs based on routing weights
This architecture usually needs to address three engineering challenges.
First is load balancing. If a large number of tokens concentrate on a few experts, it will cause some devices to overload while others remain idle, ultimately reducing overall throughput. Therefore, load balancing constraints are typically introduced during training to distribute tokens reasonably across different experts.
Second is cross-device communication. Different experts may be distributed across different computing devices. Tokens need to be redistributed among devices after routing and gathered back after computation. This process introduces communication latency, placing high demands on network bandwidth, communication topology, and parallel strategies.
Third is training stability. The router itself affects the model’s gradient propagation and expert utilization. If routing is too concentrated, some experts may be under-trained; if too random, it may affect model convergence and actual performance. Therefore, training MoE models is not just a matter of parameter scale but also involves complex systems engineering and optimization algorithm design.
III. Training Scale and Cost Analysis
Public data indicates that the model’s training phase utilized about 2,048 high-performance computing cards, with total training card-hours reaching approximately 2.788 million hours, of which the pre-training phase accounted for about 2.664 million hours. Averaged over the total card-hours, each card was used for roughly 1,361 hours, or about 56.7 days.
It is important to note that card-hours do not equate to the complete R&D cost. Actual costs may also include data processing, algorithmic research, experimental iterations, storage, networking, cluster scheduling, fault recovery, evaluation, and engineering personnel. According to related reports, its R&D cost was about $5.576 million, but this figure is better suited as an estimation under specific criteria and cannot simply be equated to the full investment required for any organization to reproduce it.
From an engineering perspective, the MoE architecture can reduce the computational load per token while maintaining a large model capacity, thereby helping to improve resource utilization for both training and inference. However, sparse activation does not necessarily mean the system is simpler or cheaper. Large-scale expert parallelism introduces additional overheads in communication, memory management, task scheduling, and fault tolerance. The architectural advantages can only be truly realized under the premise of software-hardware co-optimization.
IV. Model Capabilities and Performance
Compared to the previous generation, the model’s generation speed has reportedly increased by about 3 times based on public data. In practical applications, generation speed is typically influenced by multiple factors, including input length, output length, batch size, concurrent requests, cache hit rate, quantization method, network latency, and the computing power of the deployment device.
Its capabilities are primarily concentrated in the following areas:
1. Chinese Understanding and Generation
The model adapts well to Chinese semantics, contextual relationships, and long-text expression, capable of tasks such as summarization, rewriting, information extraction, QA, and multi-turn dialogue. For enterprise knowledge base scenarios, it can be combined with Retrieval-Augmented Generation (RAG) technology to reduce instances of the model generating answers outside the provided materials.
2. Mathematical and Logical Tasks
The model performs notably well in mathematical calculations, conditional reasoning, and structured problem analysis. In practical use, it is recommended to require the model to display reasoning steps, key assumptions, and final conclusions, and to verify the results through programs or rules, avoiding treating the language model’s output as an absolutely correct calculation result.
3. Code and Technical Text
The model can assist with code explanation, function generation, error analysis, API documentation compilation, and test case design. However, in production environments, generated code must undergo static checks, unit testing, dependency review, and security scanning, with special attention to unauthorized access, sensitive information leakage, and unsafe input handling.
4. Long Context Processing
As the context window expands, the model can process longer documents, meeting minutes, and project materials at once. However, a long context does not mean all content is utilized with equal effectiveness. The longer the input, the more important retrieval, sorting, compression, and key point localization become. Engineering solutions such as segmentation, summarization, vector retrieval, and hierarchical memory are still needed to improve information utilization.
V. Deployment Methods and Application Integration
The model can be deployed via public cloud APIs, hosted inference services, containerized environments, or local computing clusters. For teams looking to quickly verify results, calling standardized model services can reduce infrastructure construction. For organizations with high requirements for data isolation, access control, and compliance auditing, private or dedicated resource deployment may be considered.
When using cloud platforms such as Baidu AI Cloud, enterprises can typically build applications around the following generic components:
- Use computing resources to host model inference services;
- Use object storage to save raw documents, training data, and evaluation results;
- Use databases or vector retrieval components to manage knowledge content;
- Use message queues to handle asynchronous tasks and batch inference;
- Use logging services to record requests, responses, exceptions, and resource usage;
- Use monitoring and alerting systems to track latency, throughput, error rates, and memory usage.
A relatively complete application pipeline can be represented as:
User Request↓Authentication and Permission Verification↓Question Rewriting and Intent Recognition↓Knowledge Retrieval or Business Data Query↓Prompt Assembly↓Model Inference↓Content Security and Format Verification↓Result Return and Logging
Here, the model is only part of the entire system. What truly affects business outcomes often includes data quality, prompt design, retrieval accuracy, result verification, and exception handling mechanisms.
VI. Version Evolution and Ecosystem Expansion
Since its release, the model has undergone continuous iteration. A minor version upgrade appeared in March 2025, followed by subsequent versions. Version evolution typically revolves around instruction following, reasoning capabilities, generation speed, context length, tool calling, and deployment compatibility.
In terms of the application ecosystem, the model has gradually entered various cloud platforms, computing platforms, and development service platforms, supporting online API calls, model hosting, container deployment, and dedicated resource execution. For developers, platform-based deployment lowers the barrier to using the model; for enterprises, further evaluation of data ownership, service availability, API stability, migration costs, and long-term O&M capabilities is required.
It is particularly important to note that a version upgrade does not necessarily mean a comprehensive improvement across all tasks. Different versions may exhibit differences in speed, stability, long-text capabilities, and complex reasoning. Therefore, before officially switching, regression tests using real enterprise samples should be conducted, rather than relying solely on a single public benchmark.
VII. Key Practices for Enterprise Implementation
First, establish an evaluation set. The evaluation data should cover common questions, boundary cases, sensitive issues, and failure cases in real business scenarios, and be scored across dimensions such as accuracy, completeness, response speed, format adherence, and security.
Second, implement hierarchical routing. Simple Q&A can use lightweight models, while complex analysis can call large models, thereby reducing average costs and improving overall response efficiency.
Third, perform result verification. For high-risk information such as amounts, dates, permissions, contract terms, and technical configurations, rule engines, database queries, or manual review should be combined to avoid relying entirely on generated results.
Fourth, strengthen security governance. It is necessary to perform sensitive information identification, prompt attack detection, unauthorized access interception, and audit logging on inputs and outputs. Special attention must be paid to preventing users from inducing the model to leak system prompts or internal data through special instructions.
Fifth, focus on resource optimization. Inference costs can be reduced through batching, KV caching, quantization, request merging, dynamic rate limiting, and elastic scaling. However, any optimization should be based on actual evaluation results and not just pursue a single metric of speed.
VIII. Conclusion
The significance of such large-scale MoE language models lies not only in their massive parameter count but also in finding a balance between model capability and computational efficiency through sparse activation, expert parallelism, and system-level optimization. Their training scale, inference speed, and Chinese task performance make them suitable for scenarios such as intelligent QA, knowledge retrieval, code assistance, content analysis, and enterprise automation.
However, model capability cannot replace complete application engineering. Only by combining the model with high-quality data, reliable retrieval, access control, monitoring systems, and business verification can a stable, maintainable, and auditable production system be formed. For developers and enterprise users, understanding architectural principles, validating real-world effects, and establishing a continuous evaluation mechanism are key to unlocking the value of large models.
