Papers › Aioli: A Unified Optimization Framework for Language Model Data Mixing

Aioli: A Unified Optimization Framework for Language Model Data Mixing

8 Nov 2024arXiv:2411.05735archive 2025-07-28

Mayee F. Chen, Michael Y. Hu, Nicholas Lourie, Kyunghyun Cho, Christopher Ré

Language model performance depends on identifying the optimal mixture of data groups to train on (e.g., law, code, math). Prior work has proposed a diverse set of methods to efficiently learn mixture proportions, ranging from fitting regression models over training runs to dynamically updating proportions throughout training. Surprisingly, we find that no existing method consistently outperforms a simple stratified sampling baseline in terms of average test perplexity. To understand this inconsistency, we unify existing methods into a standard framework, showing they are equivalent to solving a common optimization problem: minimize average loss subject to a method-specific mixing law -- an implicit assumption on the relationship between loss and mixture proportions. This framework suggests that measuring the fidelity of a method's mixing law can offer insights into its performance. Empirically, we find that existing methods set their mixing law parameters inaccurately, resulting in the inconsistent mixing performance we observe. Using this insight, we derive a new online method named Aioli, which directly estimates the mixing law parameters throughout training and uses them to dynamically adjust proportions. Aioli outperforms stratified sampling on 6 out of 6 datasets by an average of 0.27 test perplexity points, whereas existing methods fail to consistently beat stratified sampling, doing up to 6.9 points worse. Moreover, in a practical setting where proportions are learned on shorter runs due to computational constraints, Aioli can dynamically adjust these proportions over the full training run, consistently improving performance over existing methods by up to 12.012 test perplexity points.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2411.05735")

Code

Syntology Ran 10 of 31 code samples harvested from 1 repository linked to this paper; 21 have no recorded run. Of those that ran: 1 ran · honoured contract; 4 ran · our draft was wrong; 5 ran with no contract checked.

By repository: official repository: 31 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

hazyresearch/aioli officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

31 samples harvested; 10 ran; 1 honoured the contract we drafted; 21 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
4ran · our draft was wrong
5ran
21unverified

Licence: 0 of the 31 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from hazyresearch/aioli. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

AbstractTrainer hazyresearch/aioli/trainer/aioli_trainer.py official repository ran Apache-2.0 (permissive) · aa9e619f3278e4bc · report
AioliTrainer hazyresearch/aioli/trainer/aioli_trainer.py official repository ran Apache-2.0 (permissive) · 3cae68a5efb29625 · report
LinearWarmupCosineLR hazyresearch/aioli/trainer/aioli_trainer.py official repository ran Apache-2.0 (permissive) · 58161c1847700499 · report
StringDataCollator hazyresearch/aioli/trainer/aioli_trainer.py official repository ran Apache-2.0 (permissive) · a6ada8ea3d1c8d08 · report
create_optimizer_scheduler hazyresearch/aioli/trainer/aioli_trainer.py official repository ran · our draft was wrong Apache-2.0 (permissive) · ac3ed26036cd8353 · report
get_scheduler_extended hazyresearch/aioli/trainer/aioli_trainer.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 7ecff0f37380fa48 · report
get_steps hazyresearch/aioli/trainer/aioli_trainer.py official repository ran · honoured contract Apache-2.0 (permissive) · 2cc66e9c3b61d3ad · report
get_tokenized_train_dataset hazyresearch/aioli/trainer/aioli_trainer.py official repository ran · our draft was wrong Apache-2.0 (permissive) · ceda5669cbbae013 · report
get_tokenized_val_dataset hazyresearch/aioli/trainer/aioli_trainer.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 34a317ad4275d585 · report
get_train_dataloader hazyresearch/aioli/trainer/aioli_trainer.py official repository ran Apache-2.0 (permissive) · 2832a5cae93655cc · report
ExtendedSchedulerType hazyresearch/aioli/trainer/aioli_trainer.py official repository unverified Apache-2.0 (permissive) · d251e579d9c1e9b5 · report
aggregate_task_category HazyResearch/aioli/evaluator/utils.py official repository unverified Apache-2.0 (permissive) · 838c84352eff715d · report
calculate_r_squared HazyResearch/aioli/analysis/law.py official repository unverified Apache-2.0 (permissive) · cc3ad484cd8dd56c · report
collate HazyResearch/aioli/mixing_law_fitting.py official repository unverified Apache-2.0 (permissive) · 92cb091d2427e662 · report
cover_simplex HazyResearch/aioli/dirichlet_cover.py official repository unverified Apache-2.0 (permissive) · 9e72f9c47ff11092 · report
fit_multi_obj_scaling_laws HazyResearch/aioli/analysis/law.py official repository unverified Apache-2.0 (permissive) · 4ac03e5149b1ef69 · report
fit_scaling_laws HazyResearch/aioli/analysis/law.py official repository unverified Apache-2.0 (permissive) · ae58a6abc7dd4a7e · report
get_flat_grad HazyResearch/aioli/trainer/doge_trainer.py official repository unverified Apache-2.0 (permissive) · d0f3b712c535ab79 · report
get_grad_dict HazyResearch/aioli/trainer/doge_trainer.py official repository unverified Apache-2.0 (permissive) · e4fac505ef94582c · report
get_logger HazyResearch/aioli/utils.py official repository unverified Apache-2.0 (permissive) · 0cb39a42612d17ad · report
get_model_type HazyResearch/aioli/utils.py official repository unverified Apache-2.0 (permissive) · f262463f78c9ed6e · report
get_slimpajama_6b HazyResearch/aioli/dataset/slimpj_dataset.py official repository unverified Apache-2.0 (permissive) · f9c6848b0a94945a · report
interleave_datasets HazyResearch/aioli/dataset/slimpj_dataset.py official repository unverified Apache-2.0 (permissive) · fb3cbc008efc4356 · report
interleave_per_batch_mapped HazyResearch/aioli/dataset/slimpj_dataset.py official repository unverified Apache-2.0 (permissive) · 1f02cd5ca2dc84d5 · report
load_weight_diff_from_folder HazyResearch/aioli/mixing_law_fitting.py official repository unverified Apache-2.0 (permissive) · 9b58281c06357914 · report
load_weights_from_folder HazyResearch/aioli/mixing_law_fitting.py official repository unverified Apache-2.0 (permissive) · 7a0383d468979671 · report
make_output_dir HazyResearch/aioli/utils.py official repository unverified Apache-2.0 (permissive) · 6b3f2ccf676d8314 · report
parse_resumed_model_cpkt HazyResearch/aioli/evaluator/utils.py official repository unverified Apache-2.0 (permissive) · f919e9b193bdb7f9 · report
save_aioli_matrices hazyresearch/aioli/trainer/aioli_trainer.py official repository unverified Apache-2.0 (permissive) · ed16693f655ad564 · report
save_loss HazyResearch/aioli/evaluator/utils.py official repository unverified Apache-2.0 (permissive) · 2dec393904abb40d · report
save_model_and_optimizer hazyresearch/aioli/trainer/aioli_trainer.py official repository unverified Apache-2.0 (permissive) · 30c6dd51f43019b0 · report

Tasks

Language ModelingLanguage ModellingMath

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SET

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections