Papers › QuRating: Selecting High-Quality Data for Training Language Models

QuRating: Selecting High-Quality Data for Training Language Models

15 Feb 2024arXiv:2402.09739archive 2025-07-28

Alexander Wettig, Aatmik Gupta, Saumya Malik, Danqi Chen

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 pre-training 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.

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="2402.09739")

Code

Syntology Ran 5 of 12 code samples harvested from 1 repository linked to this paper; 7 have no recorded run. Of those that ran: 5 ran with no contract checked.

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

princeton-nlp/qurating officialmentioned in papermentioned on GitHubpytorch 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

12 samples harvested; 5 ran; 0 honoured the contract we drafted; 7 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.

5ran
7unverified

Licence: 12 of the 12 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 princeton-nlp/qurating. “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.

bce_with_temperature princeton-nlp/qurating/training/train_preference_model.py official repository ran fingerprinted no licence file found · pointer only · 083746de8aae3163 · report
datasets_select princeton-nlp/qurating/data_tools/select_subset.py official repository ran no licence file found · pointer only · 87e03822be3909ba · report
init_kmeans princeton-nlp/qurating/analysis/cluster.py official repository ran no licence file found · pointer only · 95df96eaabea2e61 · report
load_datasets princeton-nlp/qurating/training/train_preference_model.py official repository ran no licence file found · pointer only · d0518a77df116eb2 · report
maybe_concatenate princeton-nlp/qurating/data_tools/select_subset.py official repository ran no licence file found · pointer only · 8323501f6dfa40e4 · report
confidence_mask princeton-nlp/qurating/training/train_preference_model.py official repository unverified no licence file found · pointer only · 3ce19eb76da9d772 · report
get_features princeton-nlp/qurating/analysis/cluster.py official repository unverified no licence file found · pointer only · 16c94cce1b3d8fd4 · report
get_top_terms princeton-nlp/qurating/analysis/cluster.py official repository unverified no licence file found · pointer only · 4fd67c0c27111318 · report
load_attributes_for_dataset princeton-nlp/qurating/data_tools/select_subset.py official repository unverified no licence file found · pointer only · 1e02cfadf0a0ba42 · report
make_table princeton-nlp/QuRating/eval/lm-evaluation-harness/lm_eval/evaluator.py official repository unverified no licence file found · pointer only · 9d95c14130837ee4 · report
repeat_kv princeton-nlp/qurating/modeling/modeling_flash_llama.py official repository unverified no licence file found · pointer only · 69874376c94f0785 · report
rmsnorm_func princeton-nlp/qurating/modeling/modeling_flash_llama.py official repository unverified no licence file found · pointer only · ab6fba34dd3815d7 · report

Tasks

In-Context Learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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