Always Learning, Always Mixing: Efficient and Simple Data Mixing All The Time

Michael Y. Hu, Apurva Gandhi, Kyunghyun Cho, Tal Linzen, Pratyusha SharmaarXiv 2026

TL;DR

OP-MIX (On-Policy Mix) is a unified data mixing algorithm that optimizes data composition across the entire language model training lifecycle—from pretraining to continual instruction tuning. By linearly interpolating lightweight LoRA adapters trained directly on the target model, OP-MIX accurately simulates candidate data mixtures without expensive separate proxy models, cutting compute costs by up to 95% while matching or exceeding state-of-the-art performance.

What Problem Does This Paper Address?

Determining the right blend of data sources (data mixing) is one of the most critical yet computationally expensive aspects of training large language models (LLMs). In pretraining, the data mix dictates downstream capabilities; in continual learning, it determines whether a model retains old knowledge while acquiring new skills.

Currently, the industry relies on training small "proxy" models from scratch on various data mixtures and extrapolating the results to the full-scale model. This approach suffers from three major flaws:

  1. Combinatorial Explosion: It scales poorly as the number of data domains grows.
  2. Proxy Divergence: Small proxy models often exhibit entirely different learning dynamics than the actual target model.
  3. Phase Isolation: Existing methods are specialized for a single phase (e.g., pretraining) and fail to handle the evolving, open-ended stream of datasets encountered during continual midtraining or instruction tuning.

The authors argue that data mixing should not be treated as a series of isolated, offline tasks, but rather as a single, continuous online decision-making problem.

Methods

OP-MIX avoids the need for separate proxy models by keeping the data-mixing search on-policy—meaning it leverages the exact model currently being trained.

Figure 1: Overview of OP-MIX. OP-MIX aims to cheaply estimate optimal data mixing ratios in a continual setting. (1) Train a lightweight LoRA adapter on new domains to estimate future performance. (2) Interpolate adapters to simulate different data mixtures without retraining and then estimate the optimal mixture ratio. (3) Train the base model with the computed mixture.

When new datasets arrive, the algorithm proceeds in three simple steps:

  1. Train On-Policy LoRAs: Instead of full-parameter training, OP-MIX trains a lightweight Low-Rank Adapter (LoRA) for each new data domain, plus one additional adapter on the historical data mixture, all starting from the current base model state.
  2. Simulate Mixtures via Interpolation: Capitalizing on the property of linear mode connectivity, the authors simulate different data mixing ratios by simply interpolating the weights of these LoRA adapters. This allows them to evaluate thousands of candidate mixtures using cheap forward passes rather than full training runs.
  3. Predict and Optimize: A log-linear regression model fits the simulated loss surface. The algorithm then solves a regularized optimization problem to find the ideal mixing weights ($\alpha^*$), which are subsequently used to guide full-parameter training on the base model.

Datasets

The authors evaluated OP-MIX across three distinct training phases using several established benchmarks:

  • Pretraining & Continual Midtraining: Models were trained on a 5-domain mix consisting of Algebraic Stack, ArXiv, C4, Reddit, and StackExchange (with Open Web Math added during midtraining permutations).
  • Continual Instruction Tuning: The authors used three sequential instruction-following domains introduced one at a time: Tool Use (4k examples), Science (1.2k examples), and Medical (10k examples).
  • Downstream Evaluation: Zero-shot accuracy was measured across standard benchmarks including ARC-Easy/Challenge, BoolQ, CommonsenseQA, HellaSwag, OpenBookQA, PIQA, WinoGrande, and MMLU.

Key Insights and Ideas

  • LoRAs as Perfect Proxies: The core "aha" moment is that a LoRA adapter trained directly on the current model state is a better indicator of that model's future learning dynamics than a separate, smaller full-parameter model initialized from scratch.
  • Linear Mode Connectivity for Data Mixing: The paper demonstrates that linearly blending adapter weights closely tracks the true data-mixing loss surface. This turns a complex, non-linear optimization problem into a cheap post-hoc weight-merging operation.
  • Unifying the Lifecycle: By treating historical data as a single compressed "old" domain and adjusting its ratio relative to incoming data, a single algorithm seamlessly transitions from pretraining to midtraining and instruction tuning.

Key Results

OP-MIX consistently Pareto-dominates existing baselines on the performance-efficiency frontier across all tested scales (150M to 7B parameter models).

Figure 2: OP-MIX (purple) Pareto-dominates the performance-efficiency frontier when tested alongside baselines across pretraining, continual midtraining, and continual instruction tuning.
  • Pretraining: OP-MIX improved upon standard training without mixing (Empirical Risk Minimization) by 6.3% in average perplexity and matched the performance of the best data-mixing baseline (MergeMix) while saving 14% of the compute.
  • Continual Midtraining: It successfully mitigated catastrophic forgetting, matching the performance of full retraining (the gold standard "skyline") while utilizing 66% less overall compute.
  • Continual Instruction Tuning: When applied to standard Supervised Fine-Tuning (SFT), OP-MIX matched the performance of highly sophisticated on-policy self-distillation methods while using 95% less compute. Furthermore, combining OP-MIX with self-distillation yielded the highest overall accuracy (61.9%), proving that data mixing acts as an independent axis of improvement.

Limitations and Future Work

  • Scale Constraints: While the instruction tuning experiments scaled up to a 7B parameter model (Qwen2.5-7B-Instruct), the pretraining and midtraining experiments topped out at 530M parameters. It remains to be seen if these interpolation dynamics hold perfectly at frontier scales (70B+ parameters).
  • Domain Cardinality: The experiments evaluated mixtures of up to 5 or 6 domains at a time. The behavior of the LoRA proxy and weight-merging dynamics when scaling to tens or hundreds of distinct domains simultaneously is still uncharacterized.
  • Objective Functions: The current formulation focuses on cross-entropy loss and KL distillation. Extending OP-MIX to reward-based alignment objectives, such as RLHF or DPO, is an open direction for future research.

Summary updated

BibTeX
@misc{hu2026always,
  author = {Michael Y. Hu and Apurva Gandhi and Kyunghyun Cho and Tal Linzen and Pratyusha Sharma},
  title = {{Always Learning, Always Mixing: Efficient and Simple Data Mixing All The Time}},
  year = {2026},
  eprint = {2605.15220},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.15220},
}

Loading related content...

Figure