Open-Sourcing the Model Flow: How Open LLM Training Is Moving From Sharing Weights to Sharing the Full Pipeline

    Open-source large language models are increasingly judged not just on whether their weights can be downloaded, but on whether the entire training pipeline can be reproduced. This article examines the "Model Flow" concept, a newly proposed open-source delivery paradigm that exposes the full chain from pretraining and midtraining to post-training. It breaks down the model family design (Base, Instruct, Think, and RL-Zero), data engineering techniques such as token-constrained mixing and quality-aware upsampling, the three-stage post-training recipe (SFT → DPO → RLVR), and the infrastructure required to keep training transparent. Readers will learn how disclosing datasets, training code, intermediate checkpoints, and training logs enables true controlled experiments, targeted domain adaptation, and a durable technical advantage.

    1. Introduction: The Open-Source LLM Race Is Shifting From “Shipping Weights” to “Shipping the Whole Pipeline”

    The competitive focus of open-source large language models has steadily shifted in recent years. Early on, whether a model was “truly open” was measured mostly by whether the weights could be downloaded and whether the commercial license was permissive. Over time, the community realized that weights alone leave out three critical pieces:

    • Data: how the pretraining corpus is cleaned, mixed, and deduplicated;
    • Process: how preference data is constructed and how rewards are designed during post-training;
    • Trajectory: what actually happened during training, and why the loss curve suddenly spiked.

    Without these, external teams struggle both to reproduce the metrics reported in a technical report and to carry out targeted secondary development for their own vertical domains.

    A recent open-source LLM project has released a new generation of open language models spanning two parameter sizes, 7B and 32B, and has for the first time systematically proposed the concept of a “Model Flow.” The goal goes beyond delivering final weights: it makes the entire chain public, from pretraining and midtraining through post-training. This includes the datasets for each stage, the training code, intermediate checkpoints, training logs, and evaluation reports. This approach pushes open source from “sharing results” to “sharing the process,” which is significant for improving the reproducibility, auditability, and teachability of LLM R&D. Based on publicly available technical analyses, this article systematically unpacks the design philosophy and key engineering decisions behind it.

    2. Rethinking “Model Flow”: What an Open Deliverable Should Contain

    Under the traditional open-source paradigm, deliverables usually come in just two forms: model weight files and a technical report. Yet large-model training is a highly coupled systems-engineering effort. A tiny difference in any single step—the granularity of data deduplication, the learning-rate annealing schedule, or the way a reward function is written—can produce a noticeable swing in the final results. Relying only on weights and a paper therefore makes reproduction very difficult.

    The “Model Flow” abstraction treats a complete model-development effort as an auditable, traceable, experiment-ready production pipeline with at least five categories of deliverables:

    1. Weight assets: not only the final model, but also the base model, the instruction-tuned model, the reasoning model, and the intermediate checkpoints produced during training;
    2. Data assets: the data recipe used at each training stage (the mixing ratios and sampling methods for different sources), the data-construction and cleaning scripts, and the corresponding version metadata;
    3. Code assets: implementations for each stage—pretraining, midtraining, supervised fine-tuning (SFT), direct preference optimization (DPO), and reinforcement learning;
    4. Process records: loss curves, learning-rate schedules, gradient norms, throughput, and data-consumption logs;
    5. Evaluation results: systematic benchmark data across different capability dimensions, so the community can compare models side by side.

    The value of this delivery model is that it lets researchers and enterprise teams run genuinely controlled experiments for the first time. When you want to know “how increasing the proportion of code data affects mathematical ability,” you can reproduce a small-scale validation directly from the public base model and data recipe, rather than training a multi-billion-parameter model from scratch. Likewise, enterprises can use the public intermediate checkpoints to judge how much additional data their model needs to adapt to their own business.

    3. Model Family Design: Layered Progression and Modular Decoupling

    The structure of this open model family is fairly representative, with each model carrying a clearly defined functional role.

    3.1 Base: The Base Model

    The Base model learns world knowledge and language ability, serving as the foundation for all subsequent capability evolution. Its training has two stages:

    • Pretraining: on roughly 5.9T tokens of corpus, building general language ability;
    • Midtraining: using about 100B tokens of data to specifically strengthen code, math, and question-answering abilities—effectively inserting a “capability-focused” stage between general pretraining and instruction tuning.

    3.2 Instruct: The Instruction Model

    Trained on top of Base through SFT and DPO, it supports multi-turn dialogue, instruction following, and safety alignment. It is the general-purpose interactive model intended for real applications.

    3.3 Think: The Reasoning Model

    This is the flagship of the family, focused on strengthening complex reasoning and long chain-of-thought generation. It uses a three-stage post-training recipe of SFT → DPO → RLVR (see Section 6).

    3.4 RL-Zero: The Zero-Sample Reinforcement Learning Model

    One notable design is RL-Zero, which skips SFT and applies reinforcement learning with verifiable rewards (RLVR) directly on the base model. This branch is meant to answer a key question: do reasoning abilities such as long chains of thought, self-reflection, and self-verification come from large amounts of human-annotated chain-of-thought data, or can they “emerge” from the base model through reinforcement learning alone? This modular decoupling lets each layer of capability be evaluated and reproduced independently.

    4. Data Engineering: The Most Reusable Part of the Model Flow

    Data is the source of a large model’s capabilities. This series is notably more transparent on the data side than most prior open-source work. Its data system is organized into four recipe categories:

    • Pretraining recipe: determines the breadth of knowledge and language ability of the base model;
    • Midtraining recipe: determines the emphasis on specialized capabilities;
    • Long-context recipe: determines the model’s ability to handle very long documents;
    • Post-training recipe: covering instruction data, preference data, and verifiable-task data.

    Together, these four layers sketch out a data pipeline of “general → specialized → long-form → aligned.”

    4.1 Token-Constrained Mixing: Allocating by Token Budget, Not Document Count

    Traditional data mixing is often measured by “number of documents,” but this ignores the large variation in document length across sources. A web page might contain only a few hundred tokens, while a scientific paper or code repository can easily reach tens of thousands. If ratios are set by document count alone, the actual token distribution entering the training stream will deviate significantly from expectations.

    This series uses a token-constrained mixing strategy: it first sets a target token budget for each data source, then precisely controls the actual tokens consumed during sampling. The advantages are:

    • The mixing intent matches the actual training distribution;
    • When data volume changes, the mix can transfer smoothly;
    • It makes data cost easy to estimate precisely.

    4.2 Quality-Aware Upsampling: Better Than Simple Threshold Truncation

    This is one of the most instructive findings in the report. In pretraining data cleaning, a common industry practice is to score each document and set a fixed threshold, discarding everything below it. The report calls this “flat filtering” and found it hits a clear bottleneck under data-constrained conditions.

    By contrast, quality-aware upsampling does not apply a one-size-fits-all cutoff. Instead, it sorts documents into quality tiers based on their scores and designs an upsampling curve for each tier: high-quality documents are repeated moderately, medium-quality documents at a lower multiplier, and low-quality documents retained only in small amounts. The report’s experiments show that under data-constrained conditions, this approach can significantly improve downstream performance.

    The underlying logic can be summarized in three points:

    1. High-quality corpora usually contain denser effective knowledge and more standardized expression patterns, giving higher learning efficiency per token;
    2. Simple threshold truncation discards a large number of “medium-quality but still valuable” samples, wasting information;
    3. When the token budget is fixed, it is better to do controlled repetition of high-value data than to add more low-quality data.

    In engineering terms, the core implementation of this strategy can be abstracted into the following pseudocode:

    1. # 1) Score each document offline and assign a quality tier (typically 4-8 tiers)
    2. QUALITY_BUCKETS = {
    3. 0: 0.25, # Low quality: keep a small amount to avoid distribution drift
    4. 1: 0.50,
    5. 2: 1.00, # Medium: baseline sampling multiplier
    6. 3: 1.50,
    7. 4: 2.00, # High quality: moderate upsampling
    8. 5: 3.00,
    9. }
    10. # 2) Normalize each source by its "target token budget," then apply the quality multiplier
    11. def build_sampling_mixture(sources, total_token_budget):
    12. weighted = {}
    13. for name, src in sources.items():
    14. # src.base_tokens: available tokens for this source after dedup + cleaning
    15. w = src.base_tokens * QUALITY_BUCKETS[src.avg_quality_bucket]
    16. weighted[name] = w
    17. norm = sum(weighted.values())
    18. mixture = {
    19. name: total_token_budget * w / norm
    20. for name, w in weighted.items()
    21. }
    22. return mixture # tokens each source should consume in this training round
    23. # 3) Training loop: stream-sample from each source by the mixture ratio,
    24. # and log source / quality_bucket / epoch_idx per sample for traceability

    In practice, two points deserve attention:

    • The upsampling multiplier should not be set too high; excessive repetition markedly increases the risk of memorization and evaluation-data contamination, and should be constrained with deduplication strategies and perplexity monitoring;
    • The choice of quality-scoring model should avoid introducing bias, such as over-preferring encyclopedic phrasing while penalizing code, mathematical notation, and tabular structure.

    4.3 Scientific PDF Corpus: Closing the Structured-Knowledge Gap With an OCR Pipeline

    Pure web-crawled corpora often under-cover scientific papers, textbooks, and specialized literature—exactly the content that matters most for improving a model’s scientific reasoning and math ability. The report discloses that this series introduced a large amount of scientific PDF data processed through document parsing (OCR). Through layout analysis, formula recognition, and table extraction, unstructured scanned documents are turned into high-quality text.

    The value of this pipeline is that it treats “the PDF format itself” as a data-processing bottleneck, rather than simply extracting plain text. Engineering it typically requires handling the linearized representation of formulas, reading order in multi-column layouts, filtering noise from headers, footers, and references, and grading the quality of scanned images. Once such data reaches scale, the improvement in the model’s scientific-knowledge density is often quite pronounced.

    4.4 Long-Context Data Recipe

    Long-context ability is an important step for a base model to become practical. Its training data usually needs to cover task forms such as long-document question answering, cross-paragraph information aggregation, long-document summarization, and repository-level code understanding, along with an appropriate context-window extension strategy (for example, interpolation or extrapolation adjustments to positional encodings). This series publishes this portion of the data as a standalone recipe, making it easier to study the data-driven mechanisms behind long-context ability.

    5. Midtraining: Domain Tradeoffs and the Key Finding of “Capability Front-Loading”

    Midtraining is the most methodologically valuable design in this architecture. It inserts about 100B tokens of “focused training” between pretraining and post-training, and the report offers three key conclusions.

    5.1 Domain Tradeoffs: Boosting Math and Code Squeezes General Question-Answering

    Experiments show that raising the weight of math and code data during midtraining does significantly strengthen those abilities, but it simultaneously harms general QA (GenQA) and multiple-choice QA (MCQA) performance. This is a classic case of “capability crowding out”: the model over-optimizes on tokens from a specific distribution, causing general language understanding to regress.

    The final mixing recipe does not simply maximize specialized capability; it seeks a Pareto optimum—preserving general ability as much as possible within an acceptable range while pushing math and code to a higher level. The implication for enterprises is direct: vertical-domain fine-tuning is not a case of “more data is always better,” and general-capability regression metrics must be monitored at the same time.

    5.2 Front-Loading Post-Training Data: A “Free Gain” for Alignment

    Another counterintuitive finding is that if instruction-following (Instruction) and chain-of-thought (Thinking) data are introduced early, during midtraining, the base model’s performance across various benchmarks improves across the board—even with no SFT at all.

    This means alignment-style knowledge can be “written into” the base weights rather than depending entirely on the temporary shaping done in post-training. A likely explanation is that once instruction formats and chain-of-thought patterns are repeatedly exposed in the late pretraining stage, the model already forms the corresponding representational structure, so subsequent SFT only needs to activate these abilities rather than build them from zero. For engineering practice, this is a low-cost path to gains: moving some high-quality instruction and reasoning data to the tail of pretraining can raise the baseline of the entire model family.

    6. Three-Stage Post-Training Recipe: SFT → DPO → RLVR

    Post-training of reasoning models is one of the most closely watched engineering areas in recent years. The flagship reasoning model in this series uses a clear three-stage pipeline, with each stage having a well-defined goal and boundary.

    6.1 SFT: Building Foundational Format and Task Ability

    The SFT stage uses high-quality examples, human-written or synthetic, to teach the model to follow dialogue formats, follow instructions, and generate structured chains of thought. The core here is not data volume but data quality and task coverage, especially format compliance and the completeness of reasoning steps.

    6.2 DPO: Style Alignment Through Preference-Pair Construction

    The DPO stage uses paired “preferred/dispreferred” responses to teach the model human preferences. The report discloses a preference-data construction idea called “Delta Learning.” Its core idea is to generate multiple candidate responses for the same prompt, use differentiated decoding strategies (such as different temperatures and sampling configurations) to produce a candidate set with a clear quality gradient, and then automatically construct preference pairs from it.

    This method reduces dependence on large-scale human annotation while ensuring the difference within each preference pair is clear enough. Compared with RLHF, DPO does not require training a separate reward model, making training more stable and cheaper.

    6.3 RLVR: Reinforcement Learning With Verifiable Rewards

    RLVR is the key stage for improving reasoning ability. Its core idea is to use verifiable rules instead of human preferences as the reward signal. For example:

    • Math problems: compare the final answer against the reference answer for an exact match;
    • Programming problems: run unit tests and use the pass rate as the reward;
    • Instruction-following problems: use programmatic rules to check whether format constraints are satisfied.

    The report also notes that its internal RL framework made several improvements at the algorithm and infrastructure levels:

    • Removing the KL-divergence term: loosening the strong constraint on the reference model so the policy can explore more freely;
    • Introducing a token-level loss: avoiding the dilution that sequence-level averaged loss suffers in long-output scenarios, so the gradient contribution of each generated token is more precise.

    6.4 A Sketch Implementation of the Three-Stage Recipe

    1. # ---- Stage 1: SFT ----
    2. def train_sft(base_model, instruction_data, epochs=2):
    3. # Data should cover: instruction following, format constraints, structured reasoning examples
    4. return supervised_finetune(base_model, instruction_data, epochs)
    5. # ---- Stage 2: DPO (build preference pairs via Delta Learning) ----
    6. def build_preference_pairs(model, prompts, n_samples=8):
    7. pairs = []
    8. for p in prompts:
    9. # Differentiated sampling: different temperatures/decoding configs create a quality gradient
    10. cands = [model.sample(p, temperature=t) for t in (0.3, 0.7, 1.0)]
    11. scored = [(c, rule_or_model_score(p, c)) for c in cands]
    12. scored.sort(key=lambda x: x[1])
    13. if scored[-1][1] - scored[0][1] > MIN_MARGIN:
    14. pairs.append((p, scored[-1][0], scored[0][0])) # (chosen, rejected)
    15. return pairs
    16. def train_dpo(sft_model, pairs):
    17. # No separate reward model; optimize directly on the preference pairs
    18. return dpo_optimize(sft_model, pairs)
    19. # ---- Stage 3: RLVR ----
    20. def train_rlvr(model, verifiable_tasks):
    21. for batch in verifiable_tasks:
    22. rollouts = [model.sample(batch.prompt) for _ in range(G)]
    23. # Rule-based rewards: answer match / unit test pass / format check
    24. rewards = [verifier.score(batch, r) for r in rollouts]
    25. # Group-relative advantage estimation; no value network needed
    26. adv = group_relative_advantage(rewards)
    27. # Optional: drop the KL term, use token-level loss
    28. model.update(rollouts, adv, use_kl=False, token_level_loss=True)
    29. return model

    It bears emphasizing that the design of the RLVR reward function is the part of the whole pipeline that most requires domain knowledge. The more precise and comprehensive the rules, the more pronounced the model’s improvement; conversely, if the reward signal has holes, the model can easily learn to “game the system” (reward hacking)—for example, earning rewards by repeating keywords or exploiting output-format patterns.

    7. Training Infrastructure: The Engineering Foundation Behind a Transparent Model Flow

    Delivering a complete open source of this scale requires capable infrastructure across the board.

    Distributed training and mixed precision: Training models from 7B to 32B typically requires a combination of data parallelism and tensor parallelism, and long-context training further introduces sequence parallelism. Combined with bf16/fp16 mixed precision and gradient accumulation, throughput is maintained under limited GPU memory.

    Data loading pipeline: Before entering training, the pretraining corpus must be tokenized, packed, and globally shuffled. The packing strategy directly affects effective token utilization, while the attention-mask design at document boundaries determines the degree of cross-document contamination.

    Checkpoints and recoverability: Publishing complete intermediate checkpoints means the entire run must be checkpointed periodically to disk. This is not only an open-source requirement but also the basis for fault tolerance in long training runs.

    Observability: Training logs typically contain loss, gradient norm, learning rate, throughput, and data-consumption progress. Detecting training instability (loss spikes) and rolling back automatically is key to whether large-scale training converges smoothly.

    8. Reproducibility and Practical Recommendations

    For teams that want to adopt this methodology, the following recommendations are worth considering.

    8.1 The Minimum Viable Path to Reproduction

    Fully reproducing a 5.9T-token pretraining run is extremely expensive. A more pragmatic approach is to first validate data mixing and cleaning strategies at small scale (for example, 0.5B–1B parameters on a few billion tokens), using proxy metrics (such as small-scale perplexity and downstream task performance) to select the best recipe, then scale up gradually.

    8.2 Cloud Engineering Implementation

    Both training and inference create continuous demand for cloud-native capabilities such as elastic compute, object storage, container platforms, logging services, and monitoring and alerting. When using cloud resources, it is advisable to set up a complete resource and cost management dashboard and to retain an archival strategy for intermediate artifacts, so that later review and secondary training are possible.

    8.3 Vertical-Domain Adaptation

    To adapt a general base model to a specific domain, enterprises can follow the midtraining idea: mix domain corpus with general corpus in a set ratio while retaining a general-capability regression test set, to avoid the collapse of general ability that can come with gains in a specialized area.

    It is advisable to cover general knowledge and language understanding, mathematical reasoning, code generation and repair, long-context understanding, and instruction following and safety. For reasoning models, additional attention should go to the stability of multi-step reasoning and error propagation.

    9. Limitations and Outlook

    While the transparency of this series is commendable, several limitations remain:

    • Limited coverage of verifiable rewards: RLVR relies on tasks with well-defined rules; open-ended creative and subjective-evaluation tasks are still hard to accommodate;
    • Data quality and compliance: Large-scale OCR and web corpora require handling copyright and privacy concerns;
    • Reproduction barriers: Even when code and data are fully open, compute cost remains a real barrier.

    Future directions worth watching include more fine-grained model flows (such as token-level traceability), extending the model flow to multimodal capabilities, and further enriching verifiable environments.

    10. Conclusion

    The significance of this open model family lies not only in “yet another strong model,” but in demonstrating an open-source paradigm that uses transparency to enable reproducibility, and reproducibility to drive innovation. From quality-aware upsampling to domain tradeoffs, from capability front-loading to the three-stage post-training recipe, every decision is backed by experimental data and fully disclosed for scrutiny. For developers and enterprises, the most valuable asset in this kind of work is not the weights themselves but the methodology distilled within: how to clean data, how to allocate token budgets, how to construct preference data, and how to design verifiable rewards. Mastering these methods builds far more durable technical moats than downloading a single model file.