A Deep Dive into the Architecture and Training Practices of Open-Source Large Language Models

    This article examines the technical foundations behind the latest generation of open-source large language models (LLMs), which have reached performance levels comparable to top-tier closed-source reasoning models at a fraction of the training cost. It breaks down Mixture-of-Experts (MoE) architecture, low-cost pretraining engineering, reinforcement learning-based post-training, and open-source ecosystem strategies, giving developers a systematic framework for understanding how modern open LLMs are built, trained, and deployed.

    Introduction: The Rise of Open-Source Power in the LLM Era

    The competitive landscape of large language models (LLMs) is undergoing a profound shift. In the past, frontier model capabilities were monopolized by a handful of closed-source solutions, and developers could only access them through limited API calls. Today, a growing number of research teams—built around the strategy of releasing open weights and detailed technical reports—are making the complete technical details of frontier models publicly available. Between 2023 and 2025, several representative foundation model research teams emerged, and their released models matched top closed-source reasoning models on international benchmarks while keeping training costs roughly an order of magnitude lower. This phenomenon deserves close study by every developer following LLM technology.

    This article does not target any specific commercial product. Instead, from a general technical perspective, it dissects the architectural design, training methodology, and engineering practices behind this class of open-source LLMs, helping readers build a systematic understanding of the technology.

    1. Mixture-of-Experts (MoE): Decoupling Parameter Scale from Compute Cost

    1.1 The Compute Bottleneck of Dense Models

    In a traditional dense Transformer, every forward pass activates all parameters. As model size scales to tens or hundreds of billions of parameters, the compute and memory footprint per inference grows linearly, and training costs skyrocket accordingly. This makes the “just add parameters” scaling path economically unsustainable.

    1.2 The Core Idea of MoE

    Mixture-of-Experts (MoE) architecture resolves this tension through sparse activation. Its key design elements include:

    • Expert networks: The feed-forward network (FFN) layers are replaced by multiple parallel expert sub-networks, each essentially an independent FFN.
    • Routing mechanism (Router/Gating): A learnable gating network dynamically selects the Top-K experts for each input token to participate in computation.
    • Shared and routed experts: Newer designs typically introduce a small number of “shared experts” that handle general knowledge, while a large pool of “routed experts” carries specialized capabilities for narrower domains.

    Take a model with 671B total parameters but only about 37B activated per token as an example: MoE allows the model to maintain enormous parameter capacity while its actual compute cost is comparable to that of a mid-sized dense model. This “large capacity, low activation” property is the fundamental reason why current flagship open-source models almost universally adopt MoE.

    1.3 Engineering Challenges in Practice

    MoE is not a free lunch. Real-world training must address the following problems:

    1. Load balancing: Routing bias can overload some experts while leaving others idle. Auxiliary losses or auxiliary-loss-free bias adjustment strategies are needed to balance expert utilization.
    2. Communication overhead: Expert parallelism distributes experts across devices, and the cross-device dispatch and collection of tokens (All-to-All communication) becomes a throughput bottleneck. Optimizations include compute-communication overlap and intra-node-first routing.
    3. Training stability: Sparse routing amplifies gradient fluctuations, requiring careful initialization and learning rate scheduling.

    2. Engineering Methodology for Low-Cost Pretraining

    Industry-leading cases show that the full pretraining of a 671B-scale MoE model can be kept to roughly $5.576 million—far below the tens of millions of dollars commonly spent on models of comparable capability. Behind this cost control lies a set of systematic engineering optimizations:

    2.1 Mixed-Precision Training

    Using low-precision formats such as FP8 for forward computation and gradient communication, while keeping a high-precision master copy of weights for parameter updates, can nearly double training throughput with almost no accuracy loss. This demands deep engineering control over numerical stability—for example, applying tile-wise scaling to activations and preserving high-precision paths for numerically sensitive operators.

    2.2 Training Framework Optimizations

    • Pipeline parallelism improvements: Bidirectional pipeline scheduling reduces pipeline bubbles.
    • Memory management: Activation recomputation and optimizer state sharding reduce per-GPU memory pressure.
    • Data pipeline: The cleaning, deduplication, and mixture scheduling of high-quality corpora directly determine the model’s capability ceiling.

    2.3 Hardware Utilization Efficiency

    On large-scale GPU clusters, actual compute utilization (MFU) is often the key cost variable. By customizing low-level communication primitives, MFU can be raised from the industry-typical 30%–40% to significantly higher levels—equivalent to directly reducing the training cost per token.

    3. Reinforcement Learning Post-Training: The Path to Emergent Reasoning

    3.1 The Paradigm Shift from SFT to RL

    Traditional post-training relies on supervised fine-tuning (SFT) to imitate human-annotated responses, but SFT struggles to teach a model “how to think.” The new generation of reasoning models uses large-scale reinforcement learning (RL) as the core post-training method: the model generates multiple reasoning paths, and its policy is optimized based on verifiable reward signals—such as the correctness of a math answer or code passing unit tests—gradually giving rise to long chain-of-thought reasoning, self-reflection, and error correction.

    3.2 Key Training Techniques

    • Group-relative policy optimization-style algorithms: These do not rely on a separate value network; instead, they estimate baselines from the relative advantages of samples within a group, dramatically reducing training resource consumption.
    • Cold-start data: A small amount of high-quality long-reasoning samples is used for initialization, preventing chaotic outputs during the early stages of pure RL.
    • Multi-stage alternating training: RL and SFT are interleaved to balance reasoning capability with general conversational quality.

    Experiments show that models trained through this kind of pipeline can match top closed-source reasoning models on math and coding benchmarks, validating the effectiveness of the “RL-driven reasoning” technical route.

    4. Open-Source Strategy and the Developer Ecosystem

    4.1 Three Levels of Openness

    A genuinely open-source LLM typically involves three layers:

    1. Open weights: Free download, commercial use, and secondary fine-tuning (often under a permissive license).
    2. Public technical reports: Disclosure of architectural details, training methods, and ablation experiments for the community to reproduce and improve upon.
    3. Service-based access: Lowering the barrier to use through APIs and open platforms, while reaching end users through assistant-style applications.

    4.2 Practical Advice for Developers

    • Model selection: Choose between “general-purpose chat models” and “deep reasoning models” based on task complexity. Reasoning models suit math, code, and complex planning, while general models offer better cost-efficiency for ordinary Q&A.
    • Deployment: MoE models have large total parameters but small activated parameters. Combined with quantization (INT4/FP8) and expert offloading techniques, they can run on limited hardware.
    • Fine-tuning: Prefer parameter-efficient fine-tuning methods (such as LoRA), construct verifiable rewards from your own domain data, and reuse RL post-training ideas to strengthen vertical-domain capabilities.

    For enterprise-grade deployments, a complete LLM application stack can be built on general cloud service categories—object storage for corpora, container platforms to orchestrate inference services, and logging services with monitoring and alerting to ensure stability. Major cloud platforms, including Baidu AI Cloud, provide general-purpose infrastructure covering model training, deployment, and inference; developers can evaluate and choose based on their needs.

    5. Conclusion

    The rapid rise of open-source LLMs is fundamentally the combined result of MoE sparse architecture, low-cost training engineering, reinforcement learning post-training, and open ecosystem strategy. For developers, understanding these underlying principles is far more valuable than chasing any single product: architecture defines the boundary of capability, engineering defines the floor of cost, post-training defines the ceiling of intelligence, and openness defines the pace of innovation across the entire ecosystem. Mastering these four threads is essential to making sound technical decisions in the wave of LLM technology.