Programming Every Example: Lifting Pre-training Data Quality Like Experts at Scale
Not on the map. Why?
Abstract (arXiv)
Large language model pre-training has traditionally relied on human experts to craft heuristics for improving the corpora quality, resulting in numerous rules developed to date. However, these rules lack the flexibility to address the unique characteristics of individual example effectively. Meanwhile, applying tailored rules to every example is impractical for human experts. In this paper, we demonstrate that even small language models, with as few as 0.3B parameters, can exhibit substantial data refining capabilities comparable to those of human experts. We introduce Programming Every Example (ProX), a novel framework that treats data refinement as a programming task, enabling models to refine corpora by generating and executing fine-grained operations, such as string normalization, for each individual example at scale. Experimental results show that models pre-trained on ProX-curated data outperform either original data or data filtered by other selection methods by more than 2% across various downstream benchmarks. Its effectiveness spans various model sizes and pre-training corpora, including C4, RedPajama-V2, FineWeb, FineWeb-Edu, and DCLM. Furthermore, ProX exhibits significant potential in domain-specific continual pre-training: without domain specific design, models trained on OpenWebMath refined by ProX outperform human-crafted rule-based methods, improving average accuracy by 7.6% over Mistral-7B, with 14.6% for Llama-2-7B and 20.3% for CodeLlama-7B, all within 10B tokens to be comparable to models like Llemma-7B trained on 200B tokens. Further analysis highlights that ProX significantly saves training FLOPs, offering a promising path for efficient LLM pre-training. We are open-sourcing ProX with >500B corpus, models, and sharing all training and implementation details for reproducible research and future innovation. Code: https://github.com/GAIR-NLP/ProX
Key facts. Cited by 37 papers in the map (data through 7 Oct 2026). Builds on 69 of its 87 references that are in the map. First posted on arXiv 25 Sep 2024.
Builds on
69 of 87 references.
References · 69
- 2023GPT-4 Technical Reportcited by 18,132
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
38 more
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
- 2023Mistral 7Bcited by 3,065
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,928
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,793
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
- 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,442
- 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,199
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,104
- 2024Large Language Monkeys: Scaling Inference Compute with Repeated Samplingcited by 946
- 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 861
- 2017Crowdsourcing Multiple Choice Science Questionscited by 742
- 2024MiniCPM: Unveiling the Potential of Small Language Models with Scalable Training Strategiescited by 694
- 2024Self-Rewarding Language Modelscited by 654
- 2019MathQA: Towards Interpretable Math Word Problem Solving with Operation-Based Formalismscited by 653
- 2023PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallelcited by 641
- 2024TinyLlama: An Open-Source Small Language Modelcited by 604
- 2023Textbooks Are All You Needcited by 561
- 2023Textbooks Are All You Need II: phi-1.5 technical reportcited by 559
- 2022Using DeepSpeed and Megatron to Train Megatron-Turing NLG 530B, A Large-Scale Generative Language Modelcited by 557
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
- 2022MineDojo: Building Open-Ended Embodied Agents with Internet-Scale Knowledgecited by 469
- 2023Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruningcited by 408
- 2023Llemma: An Open Language Model For Mathematicscited by 385
- 2024DataComp-LM: In search of the next generation of training sets for language modelscited by 381
- 2023What Makes Good Data for Alignment? A Comprehensive Study of Automatic Data Selection in Instruction Tuningcited by 354
- 2022Dynamic Prompt Learning via Policy Gradient for Semi-structured Mathematical Reasoningcited by 347
- 2023Data Selection for Language Models via Importance Resamplingcited by 322
- 2021A Diverse Corpus for Evaluating and Developing English Math Word Problem Solverscited by 314
- 2024Inference Scaling Laws: An Empirical Analysis of Compute-Optimal Inference for Problem-Solving with Language Modelscited by 282
- 2020Retrieve, Program, Repeat: Complex Knowledge Base Question Answering via Alternate Meta-learningcited by 216
50 most cited of 69 All 69 (JSON)
Built on by
Citing papers per year: 2024: 4; 2025: 23; 2026: 10.
37 papers.
Sort:
By area:
- 2025LIMO: Less is More for Reasoningcited by 488
- 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approachcited by 372
- 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generationcited by 184
- 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Modelscited by 127
- 2025MegaMath: Pushing the Limits of Open Math Corporacited by 47
- 2025Scaling Laws Are Unreliable for Downstream Tasks: A Reality Checkcited by 27
- 2024ProVision: Programmatically Scaling Vision-centric Instruction Data for Multimodal Language Modelscited by 21
- 2025Predictive Data Selection: The Data That Predicts Is the Data That Teachescited by 20
- 2025InnovatorBench: Evaluating Agents' Ability to Conduct Innovative LLM Researchcited by 18
- 2025Sailor2: Sailing in South-East Asia with Inclusive Multilingual LLMscited by 17
- 2025RefineX: Learning to Refine Pre-training Data at Scale from Expert-Guided Programscited by 15
- 2025Generative AI Act II: Test Time Scaling Drives Cognition Engineeringcited by 14
25 more
- 2025Group-Level Data Selection for Efficient Pretrainingcited by 12
- 2025Winning the Pruning Gamble: A Unified Approach to Joint Sample and Token Pruning for Efficient Supervised Fine-Tuningcited by 8
- 2025Webscale-RL: Automated Data Pipeline for Scaling RL Data to Pretraining Levelscited by 8
- 2025Language-to-Space Programming for Training-Free 3D Visual Groundingcited by 7
- 2025SkyLadder: Better and Faster Pretraining via Context Window Schedulingcited by 6
- 2025RePro: Training Language Models to Faithfully Recycle the Web for Pretrainingcited by 6
- 2026Data Darwinism Part I: Unlocking the Value of Scientific Data for Pre-trainingcited by 6
- 2024YuLan-Mini: An Open Data-efficient Language Modelcited by 5
- 2024Compound-QA: A Benchmark for Evaluating LLMs on Compound Questionscited by 4
- 2025MASS: Mathematical Data Selection via Skill Graphs for Pretraining Large Language Modelscited by 4
- 2025Overcoming Vocabulary Mismatch: Vocabulary-agnostic Teacher Guided Language Modelingcited by 4
- 2025Does Feasibility Matter? Understanding the Impact of Feasibility on Synthetic Training Datacited by 4
- 2025Joint Selection for Large-Scale Pre-Training Data via Policy Gradient-based Mask Learningcited by 4
- 2025K2-V2: A 360-Open, Reasoning-Enhanced LLMcited by 3
- 2026Data Darwinism Part II: DataEvolve -- AI can Autonomously Evolve Pretraining Data Curationcited by 3
- 2025WeMusic-Agent: Efficient Conversational Music Recommendation via Knowledge Internalization and Agentic Boundary Learningcited by 2
- 2026Data Science and Technology Towards AGI Part I: Tiered Data Managementcited by 2
- 2026Path-Constrained Mixture-of-Expertscited by 2
- 2026Generating Pretraining Tokens from Organic Data for Data-Bound Scalingcited by 2
- 2025Matrix-Driven Identification and Reconstruction of LLM Weight Homologycited by 1
- 2026What Really Improves Mathematical Reasoning: Structured Reasoning Signals Beyond Pure Codecited by 1
- 2026UltraX: Refining Pre-Training Data at Scale with Adaptive Programmatic Editingcited by 1
- 2026DataOrchestra: Learning to Orchestrate Per-Example Curation of Pretraining Datacited by 1
- 2026Where Does the Signal Live? A Web Data Recipe for Medical Encoder Pretrainingcited by 0
- 2026ReScraper: Unified Scraping and Cleaning of Web Data for Effective LLM Pretrainingcited by 0
- 2026ReScraper: Unified Scraping and Cleaning of Web Data for Effective LLM Pretraining28 Sep 2026
- 2026DataOrchestra: Learning to Orchestrate Per-Example Curation of Pretraining Data27 Jul 2026
- 2026UltraX: Refining Pre-Training Data at Scale with Adaptive Programmatic Editing9 Jul 2026
- 2026Where Does the Signal Live? A Web Data Recipe for Medical Encoder Pretraining20 Jun 2026
- 2026What Really Improves Mathematical Reasoning: Structured Reasoning Signals Beyond Pure Code19 May 2026
- 2026Generating Pretraining Tokens from Organic Data for Data-Bound Scaling18 May 2026
- 2026Path-Constrained Mixture-of-Experts18 Mar 2026
- 2026Data Darwinism Part II: DataEvolve -- AI can Autonomously Evolve Pretraining Data Curation15 Mar 2026
- 2026Data Science and Technology Towards AGI Part I: Tiered Data Management9 Feb 2026
- 2026Data Darwinism Part I: Unlocking the Value of Scientific Data for Pre-training8 Feb 2026
- 2025Joint Selection for Large-Scale Pre-Training Data via Policy Gradient-based Mask Learning30 Dec 2025
- 2025WeMusic-Agent: Efficient Conversational Music Recommendation via Knowledge Internalization and Agentic Boundary Learning18 Dec 2025
25 more
- 2025K2-V2: A 360-Open, Reasoning-Enhanced LLM5 Dec 2025
- 2025InnovatorBench: Evaluating Agents' Ability to Conduct Innovative LLM Research31 Oct 2025
- 2025RePro: Training Language Models to Faithfully Recycle the Web for Pretraining12 Oct 2025
- 2025Webscale-RL: Automated Data Pipeline for Scaling RL Data to Pretraining Levels7 Oct 2025
- 2025Winning the Pruning Gamble: A Unified Approach to Joint Sample and Token Pruning for Efficient Supervised Fine-Tuning28 Sep 2025
- 2025Matrix-Driven Identification and Reconstruction of LLM Weight Homology8 Aug 2025
- 2025RefineX: Learning to Refine Pre-training Data at Scale from Expert-Guided Programs4 Jul 2025
- 2025Scaling Laws Are Unreliable for Downstream Tasks: A Reality Check1 Jul 2025
- 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation25 Jun 2025
- 2025Does Feasibility Matter? Understanding the Impact of Feasibility on Synthetic Training Data15 May 2025
- 2025Generative AI Act II: Test Time Scaling Drives Cognition Engineering18 Apr 2025
- 2025MegaMath: Pushing the Limits of Open Math Corpora3 Apr 2025
- 2025Overcoming Vocabulary Mismatch: Vocabulary-agnostic Teacher Guided Language Modeling24 Mar 2025
- 2025SkyLadder: Better and Faster Pretraining via Context Window Scheduling19 Mar 2025
- 2025MASS: Mathematical Data Selection via Skill Graphs for Pretraining Large Language Models19 Mar 2025
- 2025Predictive Data Selection: The Data That Predicts Is the Data That Teaches2 Mar 2025
- 2025Group-Level Data Selection for Efficient Pretraining20 Feb 2025
- 2025Sailor2: Sailing in South-East Asia with Inclusive Multilingual LLMs18 Feb 2025
- 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach7 Feb 2025
- 2025LIMO: Less is More for Reasoning5 Feb 2025
- 2025Language-to-Space Programming for Training-Free 3D Visual Grounding3 Feb 2025
- 2024YuLan-Mini: An Open Data-efficient Language Model23 Dec 2024
- 2024ProVision: Programmatically Scaling Vision-centric Instruction Data for Multimodal Language Models9 Dec 2024
- 2024Compound-QA: A Benchmark for Evaluating LLMs on Compound Questions15 Nov 2024
- 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Models7 Nov 2024
- 2025LIMO: Less is More for Reasoningcited by 488
- 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approachcited by 372
- 2025MegaMath: Pushing the Limits of Open Math Corporacited by 47
- 2025Generative AI Act II: Test Time Scaling Drives Cognition Engineeringcited by 14
- 2025K2-V2: A 360-Open, Reasoning-Enhanced LLMcited by 3
- 2026What Really Improves Mathematical Reasoning: Structured Reasoning Signals Beyond Pure Codecited by 1
- 2026What Really Improves Mathematical Reasoning: Structured Reasoning Signals Beyond Pure Code19 May 2026
- 2025K2-V2: A 360-Open, Reasoning-Enhanced LLM5 Dec 2025
- 2025Generative AI Act II: Test Time Scaling Drives Cognition Engineering18 Apr 2025
- 2025MegaMath: Pushing the Limits of Open Math Corpora3 Apr 2025
- 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach7 Feb 2025
- 2025LIMO: Less is More for Reasoning5 Feb 2025
- 2026Path-Constrained Mixture-of-Expertscited by 2
- 2026Path-Constrained Mixture-of-Experts18 Mar 2026
- 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Modelscited by 127
- 2025Scaling Laws Are Unreliable for Downstream Tasks: A Reality Checkcited by 27
- 2025Predictive Data Selection: The Data That Predicts Is the Data That Teachescited by 20
- 2025Sailor2: Sailing in South-East Asia with Inclusive Multilingual LLMscited by 17
- 2025RefineX: Learning to Refine Pre-training Data at Scale from Expert-Guided Programscited by 15
- 2025Group-Level Data Selection for Efficient Pretrainingcited by 12
- 2025Language-to-Space Programming for Training-Free 3D Visual Groundingcited by 7
- 2025SkyLadder: Better and Faster Pretraining via Context Window Schedulingcited by 6
- 2025RePro: Training Language Models to Faithfully Recycle the Web for Pretrainingcited by 6
- 2026Data Darwinism Part I: Unlocking the Value of Scientific Data for Pre-trainingcited by 6
- 2024YuLan-Mini: An Open Data-efficient Language Modelcited by 5
- 2024Compound-QA: A Benchmark for Evaluating LLMs on Compound Questionscited by 4
12 most cited of 24 All 24 (JSON)
- 2026ReScraper: Unified Scraping and Cleaning of Web Data for Effective LLM Pretraining28 Sep 2026
- 2026DataOrchestra: Learning to Orchestrate Per-Example Curation of Pretraining Data27 Jul 2026
- 2026UltraX: Refining Pre-Training Data at Scale with Adaptive Programmatic Editing9 Jul 2026
- 2026Where Does the Signal Live? A Web Data Recipe for Medical Encoder Pretraining20 Jun 2026
- 2026Generating Pretraining Tokens from Organic Data for Data-Bound Scaling18 May 2026
- 2026Data Darwinism Part II: DataEvolve -- AI can Autonomously Evolve Pretraining Data Curation15 Mar 2026
- 2026Data Science and Technology Towards AGI Part I: Tiered Data Management9 Feb 2026
- 2026Data Darwinism Part I: Unlocking the Value of Scientific Data for Pre-training8 Feb 2026
- 2025Joint Selection for Large-Scale Pre-Training Data via Policy Gradient-based Mask Learning30 Dec 2025
- 2025WeMusic-Agent: Efficient Conversational Music Recommendation via Knowledge Internalization and Agentic Boundary Learning18 Dec 2025
- 2025RePro: Training Language Models to Faithfully Recycle the Web for Pretraining12 Oct 2025
- 2025Matrix-Driven Identification and Reconstruction of LLM Weight Homology8 Aug 2025
12 newest of 24 All 24 (JSON)