Train Large, Then Compress: Rethinking Model Size for Efficient Training and Inference of Transformers
arXiv:2002.11794
Abstract
Since hardware resources are limited, the objective of training deep learning models is typically to maximize accuracy subject to the time and memory constraints of training and inference. We study the impact of model size in this setting, focusing on Transformer models for NLP tasks that are limited by compute: self-supervised pretraining and high-resource machine translation. We first show that even though smaller Transformer models execute faster per iteration, wider and deeper models converge in significantly fewer steps. Moreover, this acceleration in convergence typically outpaces the additional computational overhead of using larger models. Therefore, the most compute-efficient training strategy is to counterintuitively train extremely large models but stop after a small number of iterations. This leads to an apparent trade-off between the training efficiency of large Transformer models and the inference efficiency of small Transformer models. However, we show that large models are more robust to compression techniques such as quantization and pruning than small models. Consequently, one can get the best of both worlds: heavily compressed, large models achieve higher accuracy than lightly compressed, small models.
arXiv commentICML 2020
References in corpus (13)
- Neural Architecture Search with Reinforcement Learning
- Large Scale GAN Training for High Fidelity Natural Image Synthesis
- Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour
- Scaling Laws for Neural Language Models
- Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism
- DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs
- Reformer: The Efficient Transformer
- The Reversible Residual Network: Backpropagation Without Storing Activations
- An Empirical Model of Large-Batch Training
- Soft Threshold Weight Reparameterization for Learnable Sparsity
- Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Pruned
- Budgeted Training: Rethinking Deep Neural Network Training Under Resource Constraints
- Compressing RNNs for IoT devices by 15-38x using Kronecker Products
Cited by in corpus (7)
- Compute Trends Across Three Eras of Machine Learning
- Controllable Protein Design with Language Models
- Structured Pruning of a BERT-based Question Answering Model
- Ensemble Transformer for Efficient and Accurate Ranking Tasks: an Application to Question Answering Systems
- Pruning deep neural networks generates a sparse, bio-inspired nonlinear controller for insect flight
- Train Flat, Then Compress: Sharpness-Aware Minimization Learns More Compressible Models
- UCD-CS at W-NUT 2020 Shared Task-3: A Text to Text Approach for COVID-19 Event Extraction on Social Media