From Scaling Laws to MoE: Understanding the Evolution of Large Model Architectures

    This article traces the evolution of large language model architectures from Scaling Laws to Mixture-of-Experts (MoE). It explains why data quality matters when scaling models, how MoE separates total capacity from computational cost, and why fine-grained and shared experts help reduce redundancy and improve specialization. The discussion also highlights practical considerations for training and deploying MoE models.

    1. Introduction: Why Understand the Evolution of Large Model Architectures?

    In recent years, many new large language models have adopted the Mixture-of-Experts (MoE) architecture. When reading technical reports for the latest models, developers often encounter questions such as:

    • Why use MoE?
    • What are shared experts?
    • What does fine-grained expert design mean?

    These mechanisms did not appear in isolation. They are the result of a clear line of technical evolution. To understand the architectural choices behind today’s leading large models, it is useful to answer two preliminary questions:

    1. What are the scaling laws for model training? Given a fixed compute budget, is it better to increase the number of parameters or the amount of training data?
    2. As models continue to grow, how can inference costs be controlled?

    This article follows the evolution from revisiting Scaling Laws, to introducing MoE, and finally to the design of fine-grained and shared experts.

    2. Revisiting Scaling Laws: Data Quality Comes First

    Scaling Laws describe the power-law relationship between model performance and the number of parameters, the amount of data, and the available compute. They form a theoretical foundation for training large models.

    Some early studies suggested that, under the same compute budget, training on more tokens was more cost-effective than increasing model size. This view influenced the training recipes of many models.

    However, subsequent practices from open-source model development teams led to an important refinement: Scaling Laws are valid only when the training data is sufficiently high quality. If the corpus contains substantial noise, duplication, or distribution imbalance, the benefits of simply adding more data will quickly diminish.

    This leads to an important training principle:

    When data quality is sufficiently high, the same compute budget should generally prioritize increasing model scale rather than endlessly adding more data.

    This conclusion has two practical implications:

    • Start with small-scale experiments to understand the shape of the scaling curve and identify suitable hyperparameters, such as the learning rate, batch size, and the balance between model depth and width. Only then begin large-scale training to avoid committing to an inefficient configuration too early.
    • Data cleaning and quality filtering should be treated as first-class components of the training process, not as secondary preprocessing steps.

    3. Why MoE Is Needed: The Tension Between Capacity and Cost

    A standard Transformer layer consists of an attention module and a feed-forward network (FFN). Model capability depends heavily on the parameter capacity of the FFN. However, in a dense architecture, every token is processed by the entire parameter set, so inference cost increases with model size.

    The core idea behind MoE is conditional computation. MoE replaces the FFN with multiple expert networks. The total number of parameters can be very large, while each token activates only a subset of the experts during the forward pass. This decouples model capacity from computation.

    A simplified data flow looks like this:

    1. # Simplified MoE layer
    2. def moe_layer(x, experts, router, k):
    3. gate_scores = router(x) # Compute routing scores
    4. topk = select_top_k(gate_scores, k) # Select k experts
    5. output = 0
    6. for idx, weight in topk:
    7. output += weight * experts[idx](x)
    8. return output

    For example, a model may have 671B total parameters while activating only several tens of billions of parameters for a given token. This can significantly reduce memory requirements and compute costs. It is also why technical discussions of MoE models often distinguish between total parameters and activated parameters.

    4. Limitations of Traditional MoE: Expert Redundancy

    MoE is not a new concept. A traditional design might use a small number of large experts—for example, eight experts—and use Top-K routing to select two experts for each token.

    In practice, this approach exposes two major problems:

    1. Mixed knowledge within each expert. A large expert may learn syntax, general knowledge, code, mathematics, and other heterogeneous capabilities at the same time. As a result, the division of responsibilities between experts may remain unclear.
    2. Significant redundancy between experts. Common knowledge, such as general language patterns, may be learned repeatedly by every expert, reducing parameter efficiency.

    This can be compared to a company with only a few general-purpose departments. Each department handles research, customer support, and other unrelated responsibilities, resulting in overlapping capabilities and unclear roles.

    5. Fine-Grained and Shared Experts: A More Precise Division of Labor

    To address these issues, a widely adopted improvement combines two key designs.

    5.1 Fine-Grained Expert Segmentation

    Instead of using a small number of large experts, the model splits them into a larger number of smaller experts and correspondingly increases the value of K in Top-K routing.

    For example, eight large experts can be divided into 64 smaller experts, with each token activating six to eight of them. If the total number of activated parameters remains unchanged, this design provides several benefits:

    • Each smaller expert can become more specialized and focus on a narrower range of knowledge patterns.
    • The number of possible expert combinations grows dramatically, significantly improving the expressive power of routing.
    • Knowledge can be distributed more flexibly across experts.

    5.2 Shared Expert Isolation

    Knowledge that is common to all tokens can be separated into a shared expert. Every token passes through this expert unconditionally, while routed experts focus on domain-specific or otherwise differentiated knowledge.

    This prevents every routed expert from independently learning the same general knowledge. Structurally, it reduces redundancy and explicitly separates shared knowledge from specialized knowledge.

    6. Practical Takeaways

    For developers following the evolution of large model technology, this progression offers several useful lessons:

    • Before reading a new model’s technical report, understand the historical context of its architecture. Many seemingly new designs are targeted solutions to known limitations.
    • When evaluating an MoE model, consider both total parameters and activated parameters. Total parameters are related to capacity, while activated parameters are more closely related to inference cost.
    • When training a model, follow a process of validating scaling behavior with small experiments, selecting appropriate hyperparameters, and then combining high-quality data with increased model scale. This can substantially reduce the cost of trial and error.
    • When deploying an MoE model in the cloud, also monitor engineering factors such as expert-parallel communication overhead and load-balancing losses. Container platforms, monitoring, and alerting can help maintain service stability.

    7. Conclusion

    From the reassessment of Scaling Laws, to the introduction of MoE, and finally to innovations such as fine-grained and shared experts, the evolution of large model architectures reflects an ongoing effort to balance three factors: model capacity, data quality, and computational cost.

    Understanding this progression makes it easier to interpret technical reports for next-generation models. It also provides a practical framework for making decisions when training or deploying large language models.