Longformer: The Long-Document Transformer
Introduces Longformer, a transformer whose attention scales linearly with sequence length to process documents of thousands of tokens.
Standard transformers cannot process long sequences because self-attention scales quadratically with length. Longformer introduces attention that scales linearly, combining local windowed attention with task-motivated global attention as a drop-in replacement for self-attention. It reaches state-of-the-art results on character-level language modeling and, when pretrained and finetuned, consistently outperforms RoBERTa on long-document tasks, with new records on WikiHop and TriviaQA. A Longformer-Encoder-Decoder variant supports generative tasks like arXiv summarization.
Based on: Longformer: The Long-Document Transformer · arXiv.org
Curated by Aramai Editorial
Read summary →