[Paper Review] One Epoch Is All You Need
This paper proposes training unsupervised Transformer language models for only one epoch on a significantly larger dataset, while adjusting model size and training iterations via a proposed heuristic. It demonstrates that this approach achieves 3.3–5.1x speedup in wall-clock time with no overfitting, outperforms multi-epoch training, and suggests a path to reduce training costs for models like BERT and GPT-2 by up to 10x.
In unsupervised learning, collecting more data is not always a costly process unlike the training. For example, it is not hard to enlarge the 40GB WebText used for training GPT-2 by modifying its sampling methodology considering how many webpages there are in the Internet. On the other hand, given that training on this dataset already costs tens of thousands of dollars, training on a larger dataset naively is not cost-wise feasible. In this paper, we suggest to train on a larger dataset for only one epoch unlike the current practice, in which the unsupervised models are trained for from tens to hundreds of epochs. Furthermore, we suggest to adjust the model size and the number of iterations to be performed appropriately. We show that the performance of Transformer language model becomes dramatically improved in this way, especially if the original number of epochs is greater. For example, by replacing the training for 10 epochs with the one epoch training, this translates to 1.9-3.3x speedup in wall-clock time in our settings and more if the original number of epochs is greater. Under one epoch training, no overfitting occurs, and regularization method does nothing but slows down the training. Also, the curve of test loss over iterations follows power-law extensively. We compare the wall-clock time of the training of models with different parameter budget under one epoch training, and we show that size/iteration adjustment based on our proposed heuristics leads to 1-2.7x speedup in our cases. With the two methods combined, we achieve 3.3-5.1x speedup. Finally, we speculate various implications of one epoch training and size/iteration adjustment. In particular, based on our analysis we believe that we can reduce the cost to train the state-of-the-art models as BERT and GPT-2 dramatically, maybe even by the factor of 10.
Motivation & Objective
- To address the high computational cost of training large language models, especially when using multi-epoch training on large datasets.
- To investigate whether reducing training epochs to one while scaling dataset size and model capacity can improve efficiency and performance.
- To develop a heuristic for adjusting model size and number of iterations to maintain or improve performance under one-epoch training.
- To challenge the conventional wisdom that multi-epoch training is necessary for convergence in data-abundant unsupervised learning.
- To explore the feasibility of reducing training costs for state-of-the-art models like BERT and GPT-2 by up to 10x.
Proposed method
- Increase the training dataset size—e.g., by sampling more webpages from the Internet via a lenient strategy—to ensure no sample is reused within one epoch.
- Eliminate all regularization techniques, as they are shown to slow down training without preventing overfitting in one-epoch settings.
- Adjust model size and number of training iterations using a proposed heuristic that balances parameter budget and sequence length to maintain computational cost.
- Train for exactly one epoch on the enlarged dataset, using the same total number of parameter updates as in conventional multi-epoch training.
- Use power-law fitting of test loss over iterations to analyze training dynamics and validate the stability of one-epoch training.
- Apply data sampling heuristics to include more webpages from the Internet, even with some corrupt samples, and explore methods to filter or mitigate their impact.
Experimental results
Research questions
- RQ1Can training a Transformer language model for only one epoch on a larger dataset achieve better performance than multi-epoch training with the same computational budget?
- RQ2Does overfitting occur in one-epoch training when the dataset is sufficiently large, and can regularization be safely removed?
- RQ3What is the optimal trade-off between model size and number of training iterations under one-epoch training to maximize performance?
- RQ4How does the test loss curve behave over iterations in one-epoch training, and does it follow a power-law distribution?
- RQ5Can the cost of training state-of-the-art models like BERT and GPT-2 be reduced by a factor of 10 using this approach?
Key findings
- One-epoch training with dataset enlargement and proper size/iteration adjustment leads to a 3.3–5.1x speedup in wall-clock time compared to conventional multi-epoch training.
- No overfitting occurs in one-epoch training, and regularization methods are ineffective, merely slowing down training without benefit.
- The test loss over iterations follows a power-law distribution extensively, indicating stable and predictable training dynamics.
- The performance of Transformer language models improves dramatically under one-epoch training, especially when the original number of epochs was high (e.g., 10 or more).
- The proposed heuristics for size and iteration adjustment lead to 1–2.7x speedup when applied independently, and combined with one-epoch training, achieve 3.3–5.1x speedup in the authors' experiments.
- The authors speculate that training costs for models like BERT and GPT-2 could be reduced by a factor of 10 using this method, based on their analysis of scaling and efficiency.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.