Summary (Overview)
- This paper investigates the joint design of data schedules (how PT and MT token proportions change over training) and learning rate (LR) schedules in LLM training pipelines, showing they must be designed together rather than independently.
- The authors demonstrate a ranking reversal phenomenon: under LR decay throughout training (FDR), mixing PT data with MT data lowers final MT loss, but under constant LR, placing all MT data in a final pure MT stage is optimal.
- Through ablation studies, they find that LR decay should begin well after MT data enters training — the best tested relative LR decay durations lie between 10% and 40% of the MT data window, improving on both constant LR and decay matched to MT entry.
- The paper develops a theoretical model based on SGD on noisy quadratic objectives that explains why optimal data schedules depend on LR schedules, recovering the empirical ranking reversal and deriving a three-stage optimal schedule under LR decay.
- Additional findings show that gradual data schedules (ZL) reduce load imbalance spikes in MoE models compared to abrupt transitions (TS), and that joint scheduling shapes the PT-MT loss frontier.
Introduction and Theoretical Foundation
Background
LLM training pipelines typically consist of two phases:
- Pretraining (PT): uses broad web corpora
- Mid-training (MT): uses smaller, curated mixtures enriched with mathematics, code, and other targeted data
The standard approach transitions completely from PT data to MT data at some point. The paper formalizes this as a data schedule function , which denotes the fraction of MT tokens in the batch at step . The complete transition corresponds to .
Key Question
With fixed total training compute and MT token budgets, is this complete transition to MT data optimal for minimizing final MT loss?
Schedule Families
The paper compares two schedule families:
Two-Stage (TS): jumps directly to a chosen MT ratio and holds it fixed:
Zero-then-Linear (ZL): increases the MT ratio gradually:
The MT token budget is fixed via the constraint .
LR Schedule Regimes
Three LR regimes are compared:
- Const: LR remains constant throughout MT
- FDR (Full Decay Range): LR decays throughout the entire continued training period
- MDR (Matching Decay Range): LR decay starts when MT data is introduced
Methodology
Experimental Setup
Dense Model: 630M parameters, follows Qwen2.5-0.5B architecture with untied embeddings. Pretrained on 200B DCLM tokens, then trained on 20.97B tokens during MT phase with MT token budgets of 10%, 25%, or 47.75%.
MoE Model: OLMoE design with 2.99B total parameters, 64 experts per layer, top-8 routing. PT phase: 40B tokens; MT phase: 4B or 10B tokens.
Data: DCLM-Baseline as PT data, FineMath-4plus subset as MT data.
Theoretical Framework
The paper models training as SGD on a block-diagonal quadratic loss. The covariance matrices for PT and MT data are:
where , , represent shared, MT-specific, and PT-specific feature blocks respectively.
The training dynamics follow an SDE approximation:
The optimization problem is:
Empirical Validation / Results
Ranking Reversal Phenomenon
Under FDR (LR decay): Replaying PT data improves MT loss. As increases (more MT data placed later), both PT and MT loss increase. Mixing PT and MT data gives lower final MT loss than pure MT.
Under Const LR: The advantage reverses. As increases, MT loss decreases while PT loss increases. Placing all MT data in a final pure MT stage gives the lowest MT loss.
Key finding: The same data schedule can be optimal or suboptimal depending solely on the LR schedule.
Optimal LR Decay Timing
Across all 19 sweeps, the best tested relative LR decay durations (percentage of the MT data window during which LR decays) are:
| Model | TS Schedule | ZL Schedule |
|---|---|---|
| Dense | 40% | 20% |
| MoE | 20% | 10% |
The ZL schedule requires approximately half the relative decay duration of TS because its MT data window is twice as long (to reach the same final MT ratio with the same budget).
Theoretical Results
Theorem 3.1 (Informal):
-
Const LR: If , the optimal data schedule is (TS with ).
-
Linear decay (FDR): Under certain conditions on decay strength and budget , the constant-LR optimum is no longer optimal.
-
Three-stage optimum under FDR: With power-law spectral assumptions, the optimal schedule is:
where is determined by the power-law spectral assumption.
Theorem 3.2 (Informal): For TS with and stable-decay LR schedules, any optimal decay duration satisfies , meaning optimal LR decay begins strictly after MT entry.
Theoretical Interpretation
The expected final MT loss decomposes into:
where is the cumulative LR of MT updates after time .
- Under constant LR: All schedules have the same bias term (fixed ); placing MT data last maximizes at every time, minimizing variance.
- Under LR decay: Moving MT data earlier increases (reducing bias) but leaves less MT training to suppress later noise (increasing variance). The optimal schedule balances these effects.
MoE-Specific Findings
- Load balancing: TS schedules produce sharp spikes in load balancing loss at the data shift; ZL largely avoids this (Figure 6).
- Expert load rankings: ZL better preserves expert load rankings across the data shift; TS causes substantial reshuffling.
Theoretical and Practical Implications
Practical Implications
-
Data and LR schedules must be designed jointly — evaluating a data schedule in isolation is insufficient; the LR schedule determines which data schedule is optimal.
-
Delayed LR decay is beneficial: Keeping LR high after MT data enters, followed by a short final cooldown (10-40% of the MT window), outperforms both constant LR and decay matched to MT entry.
-
Gradual data mixing reduces MoE instability: ZL schedules avoid load-balancing spikes and preserve expert load rankings, making training more stable.
-
TS vs. ZL tradeoffs: TS exhibits larger PT-MT loss variation and requires more careful tuning; ZL offers a narrower range but may be preferred under constant LR for MoE models.
Theoretical Implications
-
The quadratic model provides a tractable framework for understanding data-LR coupling in optimization.
-
The bias-variance decomposition explains why the optimal data schedule is LR-dependent: constant LR favors late MT placement (variance minimization), while LR decay favors earlier placement (bias reduction).
-
The three-stage optimal schedule (PT → PT+MT mixture → MT) under FDR provides a theoretical foundation for practical data mixing strategies.
-
The power-law spectral assumption connects scaling law analyses to data scheduling theory.
Conclusion
This work demonstrates that data schedules and LR schedules should be designed together in LLM training pipelines. The key findings are:
-
Ranking reversal: The optimal data schedule depends critically on the LR schedule — PT replay is beneficial under LR decay but harmful under constant LR.
-
Joint optimization: LR decay should begin well after MT data enters training (10-40% of the MT window), balancing the benefits of high LR for MT updates against final noise reduction.
-
Theoretical grounding: A quadratic SDE model recovers both the ranking reversal and the optimal timing of LR decay, with a three-stage optimal data schedule under FDR.
Future Directions
-
Determining the form of jointly optimal schedules under fixed compute and MT token budgets remains theoretically challenging.
-
Future work should consider PT and MT losses jointly and incorporate downstream task metrics when evaluating and choosing schedules.
-
The interaction between continuous data schedules and MoE load balancing warrants further investigation.
Related papers
- Can Coding Agents Sustain Continual Evolution without Forgetting?
Continual harness evolution for coding agents suffers severe catastrophic forgetting, with verification conflicts causing up to 100% performance drops on prior tasks.
- ARLoop: Fully-Open Pre-trained Looped Transformers with Attention Residuals
ARLOOP uses sliding-window depth attention over residuals to outperform prior looped transformer designs, matching larger models with far less training data.
- Dory1.0-4B: A Looped Normalized-GPT
Dory1.0-4B, a looped 4B model, outperforms models up to 9x larger by scaling compute per token in latent space rather than generating longer outputs.