Large Scale Language Modeling: Converging on 40GB of Text in Four Hours
arXiv:1808.01371
Abstract
Recent work has shown how to train Convolutional Neural Networks (CNNs) rapidly on large image datasets, then transfer the knowledge gained from these models to a variety of tasks. Following [Radford 2017], in this work, we demonstrate similar scalability and transfer for Recurrent Neural Networks (RNNs) for Natural Language tasks. By utilizing mixed precision arithmetic and a 32k batch size distributed across 128 NVIDIA Tesla V100 GPUs, we are able to train a character-level 4096-dimension multiplicative LSTM (mLSTM) for unsupervised text reconstruction over 3 epochs of the 40 GB Amazon Reviews dataset in four hours. This runtime compares favorably with previous work taking one month to train the same size and configuration for one epoch over the same dataset. Converging large batch RNN models can be challenging. Recent work has suggested scaling the learning rate as a function of batch size, but we find that simply scaling the learning rate as a function of batch size leads either to significantly worse convergence or immediate divergence for this problem. We provide a learning rate schedule that allows our model to converge with a 32k batch size. Since our model converges over the Amazon Reviews dataset in hours, and our compute requirement of 128 Tesla V100 GPUs, while substantial, is commercially available, this work opens up large scale unsupervised NLP training to most commercial applications and deep learning researchers. A model can be trained over most public or private text datasets overnight.
arXiv comment8 pages; To appear in High Performance Machine Learning Workshop (HPML) 2018
References in corpus (21)
- Adam: A Method for Stochastic Optimization
- Very Deep Convolutional Networks for Large-Scale Image Recognition
- Distributed Representations of Words and Phrases and their Compositionality
- Deep Residual Learning for Image Recognition
- Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour
- Universal Sentence Encoder
- Mixed Precision Training
- Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks
- Visualizing and Understanding Recurrent Networks
- CNN Features off-the-shelf: an Astounding Baseline for Recognition
- Don't Decay the Learning Rate, Increase the Batch Size
- Training Deep Nets with Sublinear Memory Cost
- Deep Learning Scaling is Predictable, Empirically
- Train longer, generalize better: closing the generalization gap in large batch training of neural networks
- Learning to Generate Reviews and Discovering Sentiment
- Extremely Large Minibatch SGD: Training ResNet-50 on ImageNet in 15 Minutes
- Learned in Translation: Contextualized Word Vectors
- Learning General Purpose Distributed Sentence Representations via Large Scale Multi-task Learning
- Multiplicative LSTM for sequence modelling
- A Bayesian Perspective on Generalization and Stochastic Gradient Descent
- Unsupervised Pretraining for Sequence to Sequence Learning
Cited by in corpus (8)
- An Empirical Model of Large-Batch Training
- On the Computational Inefficiency of Large Batch Sizes for Stochastic Gradient Descent
- Practical Text Classification With Large Pre-Trained Language Models
- Generating Sentiment-Preserving Fake Online Reviews Using Neural Language Models and Their Human- and Machine-based Detection
- Beyond Human-Level Accuracy: Computational Challenges in Deep Learning
- Compressing Gradient Optimizers via Count-Sketches
- Distributed Deep Learning Strategies For Automatic Speech Recognition
- A Highly Efficient Distributed Deep Learning System For Automatic Speech Recognition