Abstract
We introduce an effective and scalable data selection technique to accelerate the pretraining of large language models (LLMs). Given the variation in quality and informativeness of web-scale corpora, we present the Learn-Focus-Review (LFR) paradigm—a dynamic training approach that adapts to the model's learning progress. Inspired by human learning techniques like spaced repetition, LFR tracks the model’s learning performance across data instances and prioritizes revisiting challenging and diverse regions of the dataset that are more prone to being forgotten, enabling better retention and more efficient learning. Through experiments spanning over 2200 GPU hours, we show that LFR significantly enhances data efficiency in pretraining while improving downstream performance across commonsense reasoning, question answering, and language modeling. LFR consistently achieves lower perplexity and higher accuracy using just 5%–19% of the training tokens as models trained on the full dataset. Notably, LFR matches the performance of industry-standard Pythia models with up to 2× the parameter count while requiring only 3.2% of the training tokens.
Introduction: The Cost of Redundancy
Pretraining Large Language Models (LLMs) has become an exercise in unsustainable excess. Between 2016 and 2023, training costs skyrocketed by a factor of 750×, far outstripping the growth of GPU memory. While web-scale datasets like SlimPajama provide trillions of tokens, much of this data is redundant or low-quality.
Existing solutions often rely on static filtering—using a proxy model to score data once and discarding the "bad" parts. However, we argue that "data importance" is a moving target. What is challenging for a model at the start of training might be trivial halfway through. Furthermore, models suffer from "forgetting": they may master a concept only to lose it as they ingest new, unrelated data. The challenge is to create a dynamic selection process that adapts to the model’s actual learning progress in real-time.
The LFR Paradigm
The LFR (Learn-Focus-Review) training pipeline is inspired by human educational psychology, specifically the concept of spaced repetition. The method consists of three repeating phases:
- Learn: The model trains on a random sample of the entire dataset. During this phase, we track the perplexity (PPL)—a measure of how "surprised" the model is by the data—and cluster the data based on its embeddings.
- Focus: The algorithm identifies "challenging" regions (clusters with high PPL) and prioritizes them. For example, if the model struggles with code more than prose, LFR will dynamically increase the frequency of code samples. "Easy" or already mastered data is temporarily set aside.
- Review: To prevent "catastrophic forgetting," the model periodically revisits the discarded "easy" data. This ensures that basic linguistic patterns and facts remain anchored in the model's long-term memory.
Crucially, LFR does not require a separate, expensive "proxy model" to score data; it uses the model's own internal feedback to guide the curriculum.
Key Insights and Empirical Results
Our experiments revealed several critical phenomena in LLM training:
- The "Multiple Descent" Phenomenon: LLMs don't learn linearly. Between 25% and 78% of data blocks are "forgotten" and "relearned" multiple times during traditional training. LFR addresses this by explicitly scheduling reviews.
- Natural Learning Trajectories: LLMs appear to follow a consistent internal curriculum. They first master conversational and anecdotal data (like CommonCrawl or Books) before they are capable of retaining factual knowledge (Wikipedia) or complex logic (GitHub code and scientific papers).
- Massive Data Efficiency: LFR-trained models achieved better downstream performance than models trained on the full dataset while using only 5%–19% of the tokens. As shown in Figure 1, LFR models consistently outperform both random sampling baselines and industry-standard Pythia models.
- Punching Above Their Weight: An LFR-trained model matched the performance of Pythia models that had twice the parameters, while requiring only 3.2% of the training tokens. Furthermore, LFR outperformed prior leading data selection methods (like Quad) by 9–13% in accuracy while using significantly less data.
Conclusion and Future Work
LFR demonstrates that a dynamic, pedagogical approach to data selection can drastically reduce the compute and data requirements for state-of-the-art LLMs. By staying "Chinchilla-optimal" and addressing the forgetting problem through structured reviews, LFR provides a scalable path forward for efficient pretraining. Future work will focus on testing these trends at "frontier" scales (70B+ parameters) and automating the hyperparameter schedules for the Focus and Review phases.
Summary updated