SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.06046 · NeurIPS · 2024

MATES : Model-Aware Data Selection for Efficient Pretraining with Data Influence Models

Chenyan Xiong, Zichun Yu, Spandan Das

arXiv · PDF · Open in the Atlas

Code that ran

11 of 12 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; 5 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2406.06046.json · badge: /api/ran/2406.06046.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
cxcscmu/MATES canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
cxcscmu/mates community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
apply_rope Ran
ran, violated the contract we drafted
cxcscmu/MATES/src/lit_gpt/model.py
code served (permissive licence) · get_code("aa32c6faaa562b69")
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 Tensor, ndim 3, dtype family float, shape (2, 3, 4) 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 torch

torch.manual_seed(0)

# Construct tensors for apply_rope function
# x: input tensor with shape (batch, seq_len, head_size)
# The function expects x to have a last dimension (head_size) that can be split in half
batch_size = 2
seq_len = 3
head_size = 4

x = torch.randn(batch_size, seq_len, head_size)

# cos and sin tensors should have compatible shape for broadcasting
# They should be able to broadcast with x
cos = torch.randn(batch_size, seq_len, head_size)
sin = torch.randn(batch_size, seq_len, head_size)

ARGS = {
    "x": x,
    "cos": cos,
    "sin": sin,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) 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
build_mask_cache Ran
ran, violated the contract we drafted
cxcscmu/MATES/src/lit_gpt/model.py
code served (permissive licence) · get_code("7ee1c3ba71156110")
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 Tensor, ndim 4, dtype family float, shape (1, 1, 8, 8) 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 torch

torch.manual_seed(0)

ARGS = {
    "max_seq_length": 8,
    "device": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 1, 8, 8) — shape (1, 1, 8, 8) 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
code Ran
ran, honoured the contract we drafted
cxcscmu/MATES/src/lit_gpt/packed_dataset.py
pointer only (licence: MIT); the stored copy get_code serves, from hrtan/fastmix, is pointer only (licence: NONE) · get_code("fa298642043e1282")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from hrtan/fastmix, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

find_multiple Ran
ran, honoured the contract we drafted
cxcscmu/MATES/src/lit_gpt/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from hrtan/fastmix, is pointer only (licence: NONE) · get_code("f5d9c92914e0ccfa")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from hrtan/fastmix, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_cosine_lr Ran
ran, honoured the contract we drafted
cxcscmu/MATES/src/pretrain/pretrain.py
code served (permissive licence) · get_code("22407bf0c87de445")
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 float, ndim 0, dtype family float, shape () 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 math

learning_rate = 0.001

batch_size = 64

micro_batch_size = 16

gradient_accumulation_steps = batch_size // micro_batch_size

lr_decay_iters = 50000 * gradient_accumulation_steps

warmup_iters = lr_decay_iters * 0.04

min_lr = 0.0001

def get_cosine_lr(it: int) -> float:
    if it < warmup_iters:
        return learning_rate * it / warmup_iters
    if it > lr_decay_iters:
        return min_lr
    decay_ratio = (it - warmup_iters) / (lr_decay_iters - warmup_iters)
    assert 0 <= decay_ratio <= 1
    coeff = 0.5 * (1.0 + math.cos(math.pi * decay_ratio))
    return min_lr + coeff * (learning_rate - min_lr)

ARGS = {
    "it": 1000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () 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
gptq_quantization Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
cxcscmu/MATES/src/lit_gpt/utils.py
code served (permissive licence) · get_code("8e4d4ed2214edc9b")
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 nullcontext. 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 torch
import torch.nn as nn
from contextlib import nullcontext

torch.manual_seed(0)

# The function gptq_quantization takes a single parameter: enabled (bool)
# The function returns a ContextManager
# When enabled=False, it returns nullcontext()
# When enabled=True, it tries to import and use _ClassReplacementContextManager and ColBlockQuantizedLinear
# For this setup, we'll test both cases, but since the imports may not be available,
# we'll focus on the simpler case where enabled=False

ARGS = {
    "enabled": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
lightning, quantize, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type nullcontext — a nullcontext output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a nullcontext 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
load_datasets Ran
ran; our contract draft was wrong, not the code
cxcscmu/MATES/src/pretrain/pretrain.py
code served (permissive licence) · get_code("3b5b9d1620b5eb91")
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 Dataset. 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 torch
import numpy as np
from pathlib import Path
import datasets
import tempfile
import os

# Create a temporary directory for the test data
temp_dir = tempfile.mkdtemp()
data_dir = Path(temp_dir)

# Create a small dummy dataset and save it
dummy_data = {
    'text': ['hello world', 'foo bar', 'test data'],
    'label': [0, 1, 0]
}

# Create a Dataset object
dataset = datasets.Dataset.from_dict(dummy_data)

# Save the dataset to disk
dataset.save_to_disk(str(data_dir))

ARGS = {
    'data_dir': data_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Dataset — a Dataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Dataset output the recorded ndim 1 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
multinomial_num_samples_1 Ran
ran; our contract draft was wrong, not the code
cxcscmu/MATES/src/lit_gpt/gen.py
pointer only (licence: MIT); the stored copy get_code serves, from beccabai/multi-agent-data-selection, is pointer only (licence: NONE) · get_code("bd2356fd43fa1a5e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from beccabai/multi-agent-data-selection, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

num_parameters Ran
ran, honoured the contract we drafted
cxcscmu/MATES/src/lit_gpt/utils.py
code served (permissive licence) · get_code("cfb725c11fe2d2f7")
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 int, ndim 0, dtype family int, shape () 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 torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Create a simple nn.Module for testing
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Instantiate the module
module = SimpleModel()

# Create ARGS dict with all parameters
ARGS = {
    "module": module,
    "requires_grad": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () 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
sample Ran
ran; our contract draft was wrong, not the code
cxcscmu/MATES/src/lit_gpt/gen.py
pointer only (licence: MIT); the stored copy get_code serves, from beccabai/multi-agent-data-selection, is pointer only (licence: NONE) · get_code("668c17707928a3d7")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from beccabai/multi-agent-data-selection, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

select Ran
ran, honoured the contract we drafted
cxcscmu/mates/src/select_data/select_data.py
code served (permissive licence) · get_code("1c40f8ad438abf7a")
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 1, dtype family int, shape (10,) 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
from unittest.mock import Mock, patch

# Create a mock args object
class Args:
    def __init__(self):
        self.method = 'random'  # Use 'random' to avoid file I/O from 'mates' method
        self.temp = 1.0
        self.model_name = 'test_model'
        self.ckpt = 'test_ckpt'

args = Args()

# Define parameters for the select function
dataset_size = 100
selection_size = 10

ARGS = {
    'dataset_size': dataset_size,
    'selection_size': selection_size,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
datasets, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (10,) — shape (10,) 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
build_rope_cache Not yet run
unverified (harvested, no recorded run)
cxcscmu/MATES/src/lit_gpt/model.py
code served (permissive licence) · get_code("c0cabd60c81402a5")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 7 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 3 the same month, 7 later) and 5 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
build_rope_cache 6 other papers
1 dated earlier, 1 the same month, 4 later
2405.20340 (2024-05)
MotionLLM: Understanding Human Behaviors from Human Motions and Videos
2406.10209 (2024-06)
Be like a Goldfish, Don't Memorize! Mitigating Memorization in Generative LLMs
2408.16725 (2024-08)
Mini-Omni: Language Models Can Hear, Talk While Thinking in Streaming
and 3 more not named here
find_multiple 6 other papers
1 dated earlier, 5 later
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
2408.15793 (2024-08)
Language Adaptation on a Tight Academic Compute Budget: Tokenizer Swapping Works and Pure bfloat16 Is Enough
2408.16725 (2024-08)
Mini-Omni: Language Models Can Hear, Talk While Thinking in Streaming
and 3 more not named here
apply_rope 5 other papers
1 the same month, 4 later
2406.10209 (2024-06)
Be like a Goldfish, Don't Memorize! Mitigating Memorization in Generative LLMs
2408.16725 (2024-08)
Mini-Omni: Language Models Can Hear, Talk While Thinking in Streaming
2410.08102 (2024-10)
Efficient Pretraining Data Selection for Language Models via Multi-Actor Collaboration
and 2 more not named here
build_mask_cache 5 other papers
1 the same month, 4 later
2406.10209 (2024-06)
Be like a Goldfish, Don't Memorize! Mitigating Memorization in Generative LLMs
2408.16725 (2024-08)
Mini-Omni: Language Models Can Hear, Talk While Thinking in Streaming
2410.08102 (2024-10)
Efficient Pretraining Data Selection for Language Models via Multi-Actor Collaboration
and 2 more not named here
code 5 other papers
1 dated earlier, 4 later
2401.02385 (2024-01)
TinyLlama: An Open-Source Small Language Model
2410.08102 (2024-10)
Efficient Pretraining Data Selection for Language Models via Multi-Actor Collaboration
2410.17891 (2024-10)
Scaling Diffusion Language Models via Adaptation from Autoregressive Models
and 2 more not named here
multinomial_num_samples_1 3 other papers
3 later
2408.16725 (2024-08)
Mini-Omni: Language Models Can Hear, Talk While Thinking in Streaming
2410.08102 (2024-10)
Efficient Pretraining Data Selection for Language Models via Multi-Actor Collaboration
2410.11190 (2024-10)
Mini-Omni2: Towards Open-source GPT-4o with Vision, Speech and Duplex Capabilities
sample 1 other paper
1 later
2410.08102 (2024-10)
Efficient Pretraining Data Selection for Language Models via Multi-Actor Collaboration

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-23.

Repositories linked to this paper

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

Abstract

Pretraining data selection has the potential to improve language model pretraining efficiency by utilizing higher-quality data from massive web data corpora. Current data selection methods, which rely on either hand-crafted rules or larger reference models, are conducted statically and do not capture the evolving data preferences during pretraining. In this paper, we introduce model-aware data selection with data influence models (MATES), where a data influence model continuously adapts to the evolving data preferences of the pretraining model and then selects the data most effective for the current pretraining progress. Specifically, we collect oracle data influence by locally probing the pretraining model and fine-tune a small data influence model to approximate it accurately. The data influence model then predicts data influence over the whole pretraining corpus and selects the most influential data for the next pretraining stage. Experiments of pretraining 410M and 1B models on the C4 dataset demonstrate that MATES significantly outperforms random data selection on extensive downstream tasks. It doubles the gains achieved by the state-of-the-art data selection approach that leverages larger reference models and reduces the total FLOPs required to reach certain performances by half. Further analyses validate the effectiveness of the locally probed oracle data influence and the approximation with data influence models. Our code is open-sourced at https://github.com/cxcscmu/MATES. 38th Conference on Neural Information Processing Systems (NeurIPS 2024).

For agents

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

get_harvested_code_for_paper("2406.06046")
get_code_for_paper("2406.06046")
have("2406.06046")

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

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

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

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

Connect an agent — have() is free.