Open-Source LLM Architecture Evolution: Scaling Laws and MoE Optimization

    Explore how an open-source large language model family evolved from dense models to mixture-of-experts architectures. This article examines its approach to scaling laws, data quality, hyperparameter tuning, fine-grained experts, and shared experts, along with the infrastructure considerations that shape large-scale training and deployment.

    Open-source large language models (LLMs) continue to evolve as development teams explore more efficient architectures and training approaches. One prominent model family illustrates this progression: an initial generation of dense models followed by a mixture-of-experts (MoE) architecture designed to improve model capacity without a proportional increase in computation.

    Its development offers useful lessons in two areas: how to balance model size and training data under a fixed compute budget, and how to structure sparse experts to improve specialization while reducing redundant learning. These lessons can help developers and enterprises evaluate architectures and plan their own model development efforts.

    1. First-Generation Dense Models: Revisiting Scaling Laws

    The first generation of this model family, commonly referred to as V1, included 7B and 67B parameter versions. A central objective was to compete with mainstream open-source models in the 70B class.

    Rather than simply increasing compute, the development team revisited established scaling laws and examined how training resources should be allocated.

    1.1 Balancing Compute, Data, and Model Size

    Scaling laws describe how model performance improves as compute, parameter count, and training data increase. The practical challenge is deciding how to allocate a fixed compute budget between a larger model and more training data.

    The team’s experiments emphasized an important condition: data quality is essential to obtaining the expected benefits of scaling.

    With sufficiently high-quality data, its findings favored allocating more of the available compute budget to a larger model rather than continually increasing the volume of training data. This contrasted with approaches that prioritize training smaller models on substantially more data.

    The reasoning was that additional parameters increase model capacity, allowing the model to capture more complex patterns within high-quality training data. In this approach, the balance between model size and data volume depended on the quality of the data, rather than on token count alone.

    1.2 Data Quality as a Core Driver

    LLM training is as much a data-engineering challenge as a compute challenge. The team’s experience highlighted the limitations of accumulating low-quality data: more data does not necessarily improve capabilities, and noisy material can interfere with what the model learns.

    Data preparation therefore required substantial investment in:

    • Cleaning the training corpus.
    • Removing duplicate content.
    • Filtering material for quality.

    These steps were central to the training strategy, not merely preprocessing tasks performed before the main work began. Expanding model capacity was most useful when the training data provided meaningful patterns for that capacity to learn.

    1.3 Hyperparameter Optimization Before Full-Scale Training

    After establishing a direction for compute allocation, the team used numerous small-scale experiments to select suitable hyperparameters, including learning rate and batch size.

    This reduced the need to make critical training decisions during an expensive full-scale run. It also provided a more systematic foundation for subsequent model iterations.

    The broader engineering lesson is straightforward: validate the relationship between data, model size, and training settings at smaller scales before committing the full training budget.

    2. Moving to Mixture-of-Experts Architectures

    Building on the dense models, the team introduced an MoE version intended to increase model capacity while keeping computation under control.

    The key architectural changes were fine-grained expert segmentation and shared experts. Together, they addressed two common weaknesses in conventional MoE designs: limited expert specialization and redundant learning across experts.

    2.1 How MoE Works—and Where Conventional Designs Fall Short

    MoE uses sparse activation, typically replacing the feed-forward network (FFN) component of a Transformer with multiple expert networks. A gating or routing network selects only a subset of those experts for each token.

    This separates total model capacity from the amount of computation performed per token. Compared with activating all parameters in a similarly sized dense model, sparse activation can substantially reduce computation. It can also reduce memory requirements associated with active computation, although the model’s full set of expert weights still requires storage.

    Conventional MoE designs often use a small number of relatively large experts—for example, eight experts—with a Top-K routing strategy, such as Top-2, selecting the experts that process each token.

    Large experts, however, may learn several different types of knowledge within the same network. This can make specialization less distinct. Multiple experts may also learn overlapping information, creating redundancy across the model.

    The result is a gap between having many expert parameters and using those parameters efficiently.

    2.2 Fine-Grained Expert Segmentation

    To address these limitations, the model family introduced a finer-grained approach to expert design. Instead of retaining a few large experts, it divided them into multiple smaller experts.

    The aim was to give each smaller expert more scope to specialize in a narrower set of patterns or knowledge.

    This change also increased routing flexibility. More experts could be selected for each token, but because each expert was smaller, the total number of activated parameters could remain approximately unchanged.

    The important distinction is between the number of activated experts and the amount of activated computation. Increasing the former does not necessarily increase the latter when expert size is reduced accordingly.

    With a larger pool of smaller experts, the router could select more precise combinations for different tokens. This supported stronger specialization and improved the model’s overall performance without relying simply on larger active networks.

    2.3 Shared Experts for Common Knowledge

    Fine-grained segmentation was complemented by a shared-expert mechanism.

    Natural language processing depends on broadly useful patterns, such as grammar and general knowledge. If every routed expert independently learns these common patterns, part of its capacity is spent duplicating information rather than developing a more specialized role.

    Shared experts provide a separate path for this common knowledge. For each token, the architecture activates:

    • All designated shared experts.
    • A selected subset of specialized experts chosen by the router.

    This creates a division of responsibilities: shared experts handle broadly applicable information, while routed experts focus on more specialized patterns.

    The design aims to reduce the need for specialized experts to repeatedly learn the same general information. By limiting this duplication, it improves parameter utilization and helps preserve expert specialization.

    Fine-grained experts and shared experts therefore address different but related problems. Smaller experts offer more flexible specialization, while shared experts provide a common foundation that reduces redundant learning.

    3. Engineering Considerations for Training and Deployment

    Neither improved scaling strategies nor more efficient architectures eliminate the need for robust infrastructure. Both dense-model training and MoE development depend on reliable compute, storage, networking, and operational tooling.

    At large scale, key challenges include:

    • Cluster communication overhead: Distributed training requires substantial coordination and data exchange across devices.
    • GPU memory constraints: Limited device memory affects how model training and execution can be organized.
    • Distributed training stability: Large training jobs must run reliably across many interconnected resources.

    Enterprises and developers working at comparable scales typically rely on high-performance heterogeneous computing clusters.

    Cloud infrastructure can support these requirements through high-performance compute instances, object storage, and efficient network topologies. Baidu AI Cloud is one example discussed in this context; its relevance to a particular project depends on the available services and the project’s deployment requirements.

    These infrastructure components provide the foundation for stable, high-throughput pretraining. Mature container platforms, monitoring, and alerting systems can further reduce operational overhead, allowing development teams to devote more attention to model algorithms and training optimization.

    The practical takeaway is that architecture and infrastructure must be considered together. A model design that uses computation more efficiently still needs an environment capable of supporting its distributed execution.

    Conclusion

    This open-source model family’s evolution offers two complementary lessons for LLM development.

    At the dense-model stage, the team treated data quality as a prerequisite for effective scaling. Under the conditions examined in its experiments, higher-quality data supported a compute-allocation strategy that favored increased model capacity over simply adding more training data.

    At the MoE stage, fine-grained experts and shared experts addressed weaknesses in conventional sparse architectures. Smaller routed experts enabled more flexible specialization, while shared experts reduced the duplication of common knowledge.

    For developers and enterprises, these ideas provide practical guidance on data preparation, model sizing, sparse architecture design, and infrastructure planning. Understanding how these elements interact is essential to making informed decisions when building, selecting, or optimizing large language models.