Scaling Data-Constrained Language Models
Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023))
Subscriber deck — free during early access
14 cards
1 Introduction
- What problem motivates data-constrained scaling laws?Chinchilla-style compute-optimal training needs ever more tokens (11 trillion for a 530B model), but text is finite: most languages are already data-constrained, and high-quality English text was projected to run out. So what should we do when we run out of unique data?
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §1
- Why was training on repeated data an open question for large language models?Most large models were trained for a single epoch and some work advised against reusing data; Galactica trained for 4.25 epochs and kept improving but wasn’t compared with a model trained on the same amount of unique data, so the value of repetition was unknown.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §1
- What were Muennighoff et al.’s headline findings?With a fixed compute budget, up to about 4 epochs of repeated data are almost as good as unique data; beyond that, returns diminish until extra compute is worthless. Data-constrained compute should go to both more parameters and more epochs, with epochs scaled slightly faster. Mixing in code can double the effective data.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §1
2 Background
- Which two questions about scaling do Muennighoff et al. separate, and what had Chinchilla answered?Allocation: how to split compute between parameters \(N\) and training tokens \(D\) (Chinchilla: scale both equally). Return: how much loss improves with more compute (a power law). Both assumed unlimited unique data.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §2
3 Method
- How do Muennighoff et al. extend the Chinchilla loss formula to repeated data?They replace data \(D\) and parameters \(N\) with effective amounts: \(D' = U_D + U_D R_D^*(1 - e^{-R_D/R_D^*})\), where \(U_D\) is unique tokens and \(R_D\) the number of repetitions (epochs − 1). A symmetric formula discounts parameters beyond what the unique data can use. \(R_D^*\) and its parameter counterpart are fitted.
Repeated tokens lose value: nearly as good as fresh up to about 4 epochs, then levelling off at about 16× (fitted R*D ≈ 15) - Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §3
- What does the effective-data formula imply about repetition?For few repetitions (\(R_D \ll R_D^*\)), repeated tokens are worth almost as much as fresh ones; as repetitions grow, their value decays to zero, so no amount of repetition can beat the loss reachable with \(U_D + U_D R_D^*\) unique tokens.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §3
4 Experimental Setup
- How were the data-constrained scaling experiments run?Over 400 GPT-2-style models from 10M to 9B parameters, trained for up to 1,500 epochs and 900B tokens on subsets of C4, always repeating the whole subset with shuffling, with cosine schedules and no early stopping; loss measured on held-out data.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §4
5 Results: Resource Allocation for Data-Constrained Scaling
- With only 100M unique tokens, how should compute be spent?Far beyond the one-epoch optimum: training 20–60× more parameters and epochs (about 7,000× more compute) cut loss by more than half, so one-epoch models under-use their data.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §5
- How does the data-constrained efficient frontier differ from Chinchilla’s?Excess parameters lose value faster than repeated data, so additional compute should go mostly to more epochs rather than equally to parameters and data. A model built this way with 27% fewer parameters beat the Chinchilla-recommended one for the same compute and data, and would also be cheaper at inference.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §5
6 Results: Resource Return for Data-Constrained Scaling
- How much worse is training for 4 epochs than on unique data?Barely: an 8.7B model trained for four epochs on 44B unique tokens ended with only 0.5% higher validation loss than one trained for a single epoch on 178B unique tokens.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §6
- Up to how many epochs does repetition pay off?The fitted \(R_D^* \approx 15\): meaningful gains up to about 16 epochs, after which returns diminish extremely fast and loss flattens; very long training (e.g. 44 epochs) can even diverge.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §6
7 Results: Complementary Strategies for Obtaining Additional Data
- Can code substitute for missing natural-language data?Yes, up to a point: filling up to 50% of the data budget with Python code didn’t hurt natural-language task performance (even helping some tasks such as bAbI and WebNLG), while more code degraded it. Code thus doubles the usable data.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §7
- What did Muennighoff et al. find about filtering when data is scarce?Perplexity filtering helped, but deduplication didn’t improve downstream tasks (though it may reduce memorization); filtering mainly pays off on noisy datasets, so it should be reserved for those.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §7
- What practical recipe for scarce data do Muennighoff et al. give?Double the data with code, then repeat the new dataset for about 4 epochs: 8× more training tokens expected to be about as good as 8× more unique data.
- Muennighoff et al., 2023, Scaling Data-Constrained Language Models (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §7
Source
- Niklas Muennighoff, Alexander M. Rush, Boaz Barak, Teven Le Scao, Aleksandra Piktus, Nouamane Tazi, Sampo Pyysalo, Thomas Wolf and Colin Raffel. 2023. Scaling Data-Constrained Language Models. In Advances in Neural Information Processing Systems 36 (NeurIPS 2023). https://papers.nips.cc/paper_files/paper/2023/hash/9d89448b63ce1e2e8dc7af72c984c196-Abstract-Conference.html