SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.09739 · ICML · 2024

QuRating: Selecting High-Quality Data for Training Language Models

Danqi Chen, Alexander Wettig, Aatmik Gupta, Saumya Malik, Latin Carr, America Latin, | Carribean, Sub-Sah, Sub-Saharan

arXiv · PDF · Open in the Atlas

Code that ran

7 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; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 6 failures of our instrument; 5 no recorded run), measured 2026-11-22; 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/2402.09739.json · badge: /api/ran/2402.09739.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
princeton-nlp/qurating canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
princeton-nlp/QuRating canonical (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
bce_with_temperature Ran
ran; our contract draft was wrong, not the code
princeton-nlp/qurating/training/train_preference_model.py
pointer only (licence: NONE) · get_code("083746de8aae3163")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/qurating 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.

datasets_select Ran
ran; our contract draft was wrong, not the code
princeton-nlp/qurating/data_tools/select_subset.py
pointer only (licence: NONE) · get_code("87e03822be3909ba")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/qurating 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.

init_kmeans Ran
ran; our contract draft was wrong, not the code
princeton-nlp/qurating/analysis/cluster.py
pointer only (licence: NONE) · get_code("95df96eaabea2e61")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/qurating 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.

load_datasets Ran
ran on a synthesized input
princeton-nlp/qurating/training/train_preference_model.py
pointer only (licence: NONE) · get_code("d0518a77df116eb2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/qurating 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.

maybe_concatenate Ran
ran; our contract draft was wrong, not the code
princeton-nlp/qurating/data_tools/select_subset.py
pointer only (licence: NONE) · get_code("8323501f6dfa40e4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/qurating 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.

repeat_kv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
princeton-nlp/qurating/modeling/modeling_flash_llama.py
pointer only (licence: NONE); the stored copy get_code serves, from hrlics/CoPE, is pointer only (licence: NONE) · get_code("69874376c94f0785")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/qurating 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.

rmsnorm_func Ran
ran; our contract draft was wrong, not the code
princeton-nlp/qurating/modeling/modeling_flash_llama.py
pointer only (licence: NONE); the stored copy get_code serves, from hrlics/CoPE, is pointer only (licence: NONE) · get_code("ab6fba34dd3815d7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/qurating 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.

confidence_mask Not yet run
unverified (harvested, no recorded run)
princeton-nlp/qurating/training/train_preference_model.py
pointer only (licence: NONE) · get_code("3ce19eb76da9d772")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/qurating 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. No invocation recorded.

get_features Not yet run
unverified (harvested, no recorded run)
princeton-nlp/qurating/analysis/cluster.py
pointer only (licence: NONE) · get_code("16c94cce1b3d8fd4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/qurating 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. No invocation recorded.

get_top_terms Not yet run
unverified (harvested, no recorded run)
princeton-nlp/qurating/analysis/cluster.py
pointer only (licence: NONE) · get_code("4fd67c0c27111318")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/qurating 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. No invocation recorded.

load_attributes_for_dataset Not yet run
unverified (harvested, no recorded run)
princeton-nlp/qurating/data_tools/select_subset.py
pointer only (licence: NONE) · get_code("1e02cfadf0a0ba42")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/qurating 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. No invocation recorded.

make_table Not yet run
unverified (harvested, no recorded run)
princeton-nlp/QuRating/eval/lm-evaluation-harness/lm_eval/evaluator.py
pointer only (licence: NONE) · get_code("9d95c14130837ee4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, princeton-nlp/QuRating 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. 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, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 3 later) and 9 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
make_table 9 other papers
4 dated earlier, 3 the same month, 2 later
2303.17003 (2023-03)
Evaluating GPT-3.5 and GPT-4 Models on Brazilian University Admission Exams
2305.14493 (2023-05)
Do prompt positions really matter?
2307.16039 (2023-07)
Okapi: Instruction-tuned Large Language Models in Multiple Languages with Reinforcement Learning from Human Feedback
and 6 more not named here
rmsnorm_func 8 other papers
2 dated earlier, 5 later, 1 undated
2310.03668 (2023-10)
GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction
2312.15166 (2023-12)
SOLAR 10.7B: Scaling Large Language Models with Simple yet Effective Depth Up-Scaling
2410.02660 (2024-10)
How to Train Long-Context Language Models (Effectively)
and 5 more not named here
repeat_kv 4 other papers
4 later
2410.02660 (2024-10)
How to Train Long-Context Language Models (Effectively)
2025.acl-long.366 (2025 (year only))
How to Train Long-Context Language Models (Effectively)
2602.05258 (2026-02)
CoPE: Clipped RoPE as A Scalable Free Lunch for Long Context LLMs
and 1 more not named here

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

Selecting high-quality pre-training data is important for creating capable language models, but existing methods rely on simple heuristics. We introduce QuRating, a method for selecting pretraining data that can capture human intuitions about data quality. In this paper, we investigate four qualities-writing style, required expertise, facts & trivia, and educational value-and find that LLMs are able to discern these qualities, especially when making pairwise judgments of texts. We train a QuRater model to learn scalar ratings from pairwise judgments, and use it to annotate a 260B training corpus with quality ratings for each of the four criteria. In our experiments, we select 30B tokens according to the different quality ratings and train 1.3B-parameter language models on the selected data. We find that it is important to balance quality and diversity. When we sample using quality ratings as logits over documents, our models obtain lower perplexity and stronger in-context learning performance than baselines. Our best model is based on educational value and performs similarly to a model trained with uniform sampling for 50% more steps. Beyond data selection, we use the quality ratings to construct a training curriculum which improves performance without changing the training dataset. We extensively analyze the quality ratings and discuss their characteristics, biases, and wider implications. 2 2 0 2 4 Writing Style Wiki-en -de -ru Book StackEx. Github ArXiv 4 2 0 2 4 Facts & Trivia 4 2 0 2 4 Educational Value 4 2 0 2 4 Required Expertise Figure 4. Distribution of quality ratings, normalized for each criterion to have zero mean and unit standard deviation across the corpus. protein, gene and energy, climate, species are rated highly on required expertise, educational value, and facts & trivia. Meanwhile, the book, author cluster tends to obtain high ratings in writing style. However, almost all clusters encompass a wide range of quality ratings. Comparison to perplexity filtering. We compare sequencelevel log-likelihood scores from Llama-2-7b (Touvron et al., 2023b) with the quality ratings across 1M training sequences and visualize the relationship in Figure 7 in the appendix. We observe that documents with low quality ratings have a wide range of likelihoods, and the Spearman correlation coefficient varies between 0.50 for writing style to -0.02 for required expertise. Therefore, QuRating is meaningfully different from selecting texts based on perplexity scores from a strong LLM (Marion et al., 2023). We study raw documents from each of the domains and clusters discussed in Section 6.1. We select training examples at the 5th, 30th, 70th and 95th percentile for each criterion, and feature random extracts in Appendix F without any cherrypicking. While this is a minute sliver of the training data, the documents still exhibit clear qualitative differences and we invite the reader to inspect them in the appendix.

For agents

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

get_harvested_code_for_paper("2402.09739")
get_code_for_paper("2402.09739")
have("2402.09739")

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

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

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

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

Connect an agent — have() is free.