Repeating a pretraining corpus for up to 4 epochs produces nearly identical validation loss and downstream accuracy as training on the same number of fresh unique tokens, before returns decay exponentially toward a 16-epoch half-life. Across more than 400 training runs up to 8.7B parameters and 900B tokens, Niklas Muennighoff and colleagues show that Chinchilla scaling breaks once unique data runs out, and that optimal allocation shifts compute toward more epochs on smaller models rather than larger parameter counts.
Most early LLMs trained strictly for a single epoch out of fear that repetition causes severe overfitting. When high-quality web text in English or lower-resource languages becomes the bottleneck, teams need to know both how much compute repetition wastes and whether to spend extra FLOPs on bigger models or more passes.
- Minimal penalty through 4 epochs: an 8.7B model trained on 44B unique C4 tokens for 4 epochs (178B total tokens) finishes with only 0.5% higher validation loss than training once on 178B unique tokens.
- Half-life around 16 epochs: fitting 182 runs yields decay constants
R_D* = 15.39(data) andR_N* = 5.31(parameters), meaning excess parameters lose value roughly 3x faster than repeated tokens (R^2 = 0.77vs0.45for naive Chinchilla). - Smaller models win under data caps: at
10^22FLOPs with 25B unique tokens, the data-constrained 6.34B model (9.7 epochs, 242B tokens) beats the Chinchilla-sized 8.67B model (7.1 epochs, 178B tokens) in test loss (2.359 vs 2.376) with 27% fewer parameters. - Code acts as a 2x data multiplier: replacing up to 50% of C4 with Python code from The Stack preserves average performance across 19 natural language tasks, giving an 8x effective token expansion when paired with 4 epochs.
The data-constrained scaling law
Standard Chinchilla scaling assumes unlimited unique text and splits compute equally between parameters N and tokens D. Muennighoff et al. separate unique tokens U_D from repetitions R_D = (D / U_D) - 1, and compute-optimal parameters U_N for U_D from excess parameter multiples R_N = (N / U_N) - 1. Each repetition decays exponentially into effective counts D' = U_D + U_D * R_D* * (1 - exp(-R_D / R_D*)) and N' = U_N + U_N * R_N* * (1 - exp(-R_N / R_N*)).
Because fitting GPT-2 runs on C4 gives R_D* = 15.39 and R_N* = 5.31, adding parameters hits diminishing returns roughly three times sooner than repeating tokens. For the 120B-parameter Galactica model (trained on 106B unique tokens for 4.25 epochs, 5.4e22 FLOPs), the fitted law predicts a 40B-parameter model trained for 12.75 epochs (1.35T tokens) would have reached lower loss while cutting inference cost 3x. The authors also show that brief validation-loss spikes at epoch boundaries (such as Galactica’s epoch-5 bump) are transient artifacts rather than permanent divergence.
Code mixing and filtering under scarcity
When unique natural language text is capped, two complementary levers behave very differently depending on corpus noise. Replacing up to 50% of C4 with Python code from The Stack in 4.2B / 84B-token runs raises the 19-task average from 22.1% (0% Python) to 23.8% (50% Python), and lifts state-tracking accuracy on bAbI from 0.0% to 23.2% before natural language scores begin falling at 60% code.
Relaxing data filters is subtler. On cleaner C4 at 4.2B parameters, perplexity filtering (top 25% lowest-perplexity passages under a Wikipedia 5-gram KenLM model, repeated ~2 epochs) boosts the 19-task average from 22.2% to 25.3%, whereas 100-character suffix-array deduplication shrinks C4 to 21B tokens and lowers the downstream average (20.5%). On noisier OSCAR, both perplexity filtering (21.4% to 23.3%) and expanded deduplication (21.4% to 22.8%) pay off.
Caveats and builder takeaway
Three limitations bound these numbers. First, the fitted law assumes monotonic decay and cannot predict mid-run divergence or double descent (observed around 200 epochs on 100M-token runs), so extreme-epoch outliers were excluded from fitting. Second, repeating the entire corpus uniformly for 4 epochs is not the same as repeating a tiny subset 100 times, which earlier work showed destroys loss; multi-epoch training also raises verbatim memorization unless paired with deduplication. Third, modern recipes often combine moderate repetition with synthetic rephrasing rather than pure verbatim passes.
In practice, if your clean pretraining pool falls short of your FLOP budget, train for 2 to 4 epochs before buying low-quality crawl noise, mix in up to 30% to 50% code, and prefer a slightly smaller model trained longer over an oversized checkpoint.


