SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.01492 · ICLR · 2025

RegMix: Data Mixture as Regression for Language Model Pre-training

Tianyu Pang, Jing Jiang, Qian Liu, Min Lin, Niklas Muennighoff, Xiaosen Zheng, Smu, Guangtao Zeng, Longxu Dou, Contextual Ai

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2407.01492.json · badge: /api/ran/2407.01492.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
sail-sg/regmix canonical (classifier label)
classifier basis: classifier_2025
5 ran · 0 no recorded run
FunctionStatusWhere it lives
generate_train_group Ran
ran; our contract draft was wrong, not the code
sail-sg/regmix/mixture_config/synthesize_mixture.py
code served (permissive licence) · get_code("76dd60969be5e35b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import random

# Set seeds for reproducibility
np.random.seed(0)
random.seed(0)

# Define arguments for generate_train_group
ARGS = {
    'groups': ['group_a', 'group_b', 'group_c'],
    'weights': [0.5, 0.3, 0.2],
    'precision': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_valid_group Ran
ran; our contract draft was wrong, not the code
sail-sg/regmix/mixture_config/synthesize_mixture.py
code served (permissive licence) · get_code("08d4762a51ea3e8f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import random
import yaml
import argparse
import os

# Analyze the function: generate_valid_group(groups)
# The function takes 'groups' parameter
# It iterates over groups with zip(groups, weights)
# So groups must be iterable (list, tuple, etc.)
# Each element is used as a string in f-string formatting

ARGS = {
    'groups': ['group_a', 'group_b', 'group_c']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_weights_dirichlet Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sail-sg/regmix/mixture_config/synthesize_mixture.py
code served (permissive licence) · get_code("3ac3f81e59a054e5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (8, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import random

# Set seeds for reproducibility
np.random.seed(0)
random.seed(0)

# Create test data
prior_dist = np.array([0.3, 0.5, 0.2])  # 3 groups with different prior probabilities
train_groups = ["group_a", "group_b", "group_c"]
minimum_number = 0.05
num_samples = 8
enable_bound = True
temperature = 0.8

ARGS = {
    "prior_dist": prior_dist,
    "train_groups": train_groups,
    "minimum_number": minimum_number,
    "num_samples": num_samples,
    "enable_bound": enable_bound,
    "temperature": temperature,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (8, 3) — shape (8, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_weights_dirichlet Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sail-sg/regmix/mixture_config/synthesize_mixture.py
code served (permissive licence) · get_code("78bd76c7783c9e22")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (8, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import random

# Set seed for reproducibility
np.random.seed(0)
random.seed(0)

# Create minimal valid arguments for generate_weights_dirichlet
prior_dist = np.array([0.3, 0.4, 0.3])  # 3 groups with prior probabilities
train_groups = ["group_a", "group_b", "group_c"]  # 3 group names
minimum_number = 0.05  # minimum weight threshold
num_samples = 8  # number of samples to generate
enable_bound = True  # enable bounds on domain usage
temperature = 0.5  # temperature for prior distribution

ARGS = {
    "prior_dist": prior_dist,
    "train_groups": train_groups,
    "minimum_number": minimum_number,
    "num_samples": num_samples,
    "enable_bound": enable_bound,
    "temperature": temperature,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (8, 3) — shape (8, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sort_and_deduplicate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sail-sg/regmix/mixture_config/synthesize_mixture.py
code served (permissive licence) · get_code("e10eeb439e12c9a9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create sample data for sort_and_deduplicate
# The function expects data that can be converted to a numpy array
# and uses lexsort on its transpose, so it should be 2D array-like

data = [
    [0.1, 0.2, 0.3, 0.4],
    [0.1, 0.2, 0.3, 0.4],  # duplicate of first
    [0.5, 0.6, 0.7, 0.8],
    [0.5, 0.6, 0.7, 0.80001],  # very close to previous, below threshold
    [1.0, 1.1, 1.2, 1.3],
]

threshold = 1e-5

ARGS = {
    "data": data,
    "threshold": threshold,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
sort_and_deduplicate
brick of this paper's assembly: helper
1 other paper
1 later
2602.00747 (2026-02)
Decouple Searching from Training: Scaling Data Mixing via Model Merging for Large Language Model Pre-training

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The data mixture for large language model pre-training significantly impacts performance, yet how to determine an effective mixture remains unclear. We propose REGMIX to automatically identify a high-performing data mixture by formulating it as a regression task. REGMIX trains many small models on diverse data mixtures, uses regression to predict performance of unseen mixtures, and applies the best predicted mixture to train a large-scale model with orders of magnitude more compute. To empirically validate REGMIX, we train 512 models with 1M parameters for 1B tokens to fit the regression model and predict the best data mixture. Using this mixture we train a 1B parameter model for 25B tokens (i.e. 1000× larger and 25× longer) which we find performs best among 64 candidate 1B parameter models with other mixtures. Furthermore, REGMIX consistently outperforms human selection in experiments involving models up to 7B models trained on 100B tokens, while matching or exceeding DoReMi using just 10% of the computational resources. Our experiments also show that (1) Data mixtures significantly impact performance; (2) Web corpora rather than data perceived as high-quality like Wikipedia have the strongest positive correlation with downstream performance; (3) Domains interact in complex ways often contradicting common sense, thus automatic approaches like REGMIX are needed; (4) Data mixture effects transcend scaling laws. Our code is available at https://github.com/sail-sg/regmix.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2407.01492")
get_code_for_paper("2407.01492")
have("2407.01492")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2407.01492.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2407.01492.svg)](https://syntology.ai/paper/2407.01492)

Connect an agent — have() is free.