Adding Recurrence to Pretrained Transformers for Improved Efficiency and Context Size
arXiv:2008.07027
Abstract
Fine-tuning a pretrained transformer for a downstream task has become a standard method in NLP in the last few years. While the results from these models are impressive, applying them can be extremely computationally expensive, as is pretraining new models with the latest architectures. We present a novel method for applying pretrained transformer language models which lowers their memory requirement both at training and inference time. An additional benefit is that our method removes the fixed context size constraint that most transformer models have, allowing for more flexible use. When applied to the GPT-2 language model, we find that our method attains better perplexity than an unmodified GPT-2 model on the PG-19 and WikiText-103 corpora, for a given amount of computation or memory.
12 pages, 5 figures
References in corpus (9)
- BioBERT: a pre-trained biomedical language representation model for biomedical text mining
- Longformer: The Long-Document Transformer
- Training Deep Nets with Sublinear Memory Cost
- Generating Long Sequences with Sparse Transformers
- Pointer Sentinel Mixture Models
- Reformer: The Efficient Transformer
- Pay Less Attention with Lightweight and Dynamic Convolutions
- Synthesizer: Rethinking Self-Attention in Transformer Models
- What the [MASK]? Making Sense of Language-Specific BERT Models