HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

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

Tao Lei

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

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. 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.

Code Repositories

asappresearch/sru
Official
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
language-modelling-on-enwiki8SRU++ Base
Bit per Character (BPC): 0.97
Number of params: 108M
language-modelling-on-enwiki8SRU++ Large
Bit per Character (BPC): 0.95
Number of params: 195M
language-modelling-on-one-billion-wordSRU++ Large
Number of params: 465M
PPL: 23.5
language-modelling-on-one-billion-wordSRU++
Number of params: 328M
PPL: 25.1
language-modelling-on-wikitext-103SRU++ Base
Number of params: 148M
Test perplexity: 18.3
Validation perplexity: 17.5
language-modelling-on-wikitext-103SRU++ Large
Number of params: 234M
Test perplexity: 17.1
Validation perplexity: 16.4

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp