When Attention Meets Fast Recurrence: Training Language Models with Reduced Compute

Tao Lei
2/24/2021
cs.CLcs.LG

Official code: asappresearch/sru (2,109 stars, Python, MIT, PyTorch, last commit 2022-01-04).

Abstract

Large language models have become increasingly difficult to train because of the growing computation time and cost. In this work, we present SRU++, a highly-efficient architecture that combines fast recurrence and attention for sequence modeling.

Show full abstract

SRU++ exhibits strong modeling capacity and training efficiency. On standard language modeling tasks such as Enwik8, Wiki-103 and Billion Word datasets, our model obtains better bits-per-character and perplexity while using 3x-10x less training cost compared to top-performing Transformer models. For instance, our model achieves a state-of-the-art result on the Enwik8 dataset using 1.6 days of training on an 8-GPU machine. We further demonstrate that SRU++ requires minimal attention for near state-of-the-art performance. Our results suggest jointly leveraging fast recurrence with little attention as a promising direction for accelerating model training and inference.

View on arXivView PDF

Code Implementations(1)

asappresearch/sruOfficial100%
PyTorchMIT

Training RNNs as Fast as CNNs (https://arxiv.org/abs/1709.02755)

2,109305Python, CudaAug 28, 20174 years agoMIT
deep-learningnlppytorchrecurrent-neural-networks

Similar Papers

Cite this paper

@article{lei2021when,
  title  = {When Attention Meets Fast Recurrence: Training Language Models with Reduced Compute},
  author = {Tao Lei},
  year   = {2021},
  eprint = {2102.12459},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.12459}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.12459.svg)](https://codeofpaper.com/paper/2102.12459)

Discussion