arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1906.06669cs.LGstat.ML
收藏

一个时代就是你所需要的一切

One Epoch Is All You Need

Georgia Institute of Technology(佐治亚理工学院)

Aran Komatsuzaki

摘要:

在无监督学习中,收集更多的数据并不总是一个昂贵的过程,不像训练。例如,考虑到互联网上有多少网页,通过修改其抽样方法来扩大用于训练GPT-2的40 GB WebText并不难。另一方面,考虑到在这个数据集上训练已经花费了数万美元,在更大的数据集上训练是不可行的。在本文中,我们建议在一个更大的数据集上仅进行一个epoch的训练,而不像目前的实践,其中无监督模型被训练了数十到数百个epoch。此外,我们建议适当调整模型大小和迭代次数。我们表明,Transformer语言模型的性能变得显着提高,以这种方式,特别是如果原始的epoch数是更大的。例如,通过将10个历元的训练替换为1个历元的训练,在我们的设置中,这将转化为挂钟时间的1.9- 3.3倍加速,如果原始历元数量更大,则加速更多。在一个epoch训练下,没有过拟合发生,正则化方法除了减慢训练速度外什么也没有做。此外,测试损失随迭代次数的变化曲线广泛遵循幂律。我们比较了在一个epoch训练下具有不同参数预算的模型的训练的挂钟时间,并且我们表明,基于我们提出的算法的大小/迭代调整在我们的情况下导致1- 2.7倍的加速。结合这两种方法,我们实现了3.3- 5.1倍的加速比。最后,我们推测一个时期的训练和大小/迭代调整的各种影响。特别是,根据我们的分析,我们相信我们可以大大降低训练最先进的模型(如BERT和GPT-2)的成本,甚至可以降低10倍。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑