Unlimiformer: Long-Range Transformers with Unlimited Length Input
Not on the map. Why?
Abstract (arXiv)
Since the proposal of transformers, these models have been limited to bounded input lengths, because of their need to attend to every token in the input. In this work, we propose Unlimiformer: a general approach that wraps any existing pretrained encoder-decoder transformer, and offloads the cross-attention computation to a single k-nearest-neighbor (kNN) index, while the returned kNN distances are the attention dot-product scores. This kNN index can be kept on either the GPU or CPU memory and queried in sub-linear time; this way, we can index practically unlimited input sequences, while every attention head in every decoder layer retrieves its top-k keys, instead of attending to every key. We evaluate Unlimiformer on several long-document and book-summarization benchmarks, showing that it can process even 500k token-long inputs from the BookSum dataset, without any input truncation at test time. We demonstrate that Unlimiformer improves pretrained models such as BART and Longformer by extending them to unlimited inputs without additional learned weights and without modifying their code. We make our code and models publicly available at https://github.com/abertsch72/unlimiformer .
Key facts. Cited by 127 papers in the map (data through 7 Oct 2026). Builds on 48 of its 56 references that are in the map. First posted on arXiv 2 May 2023.
Builds on
48 of 56 references.
References · 48
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2017Billion-scale similarity search with GPUscited by 2,477
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Reformer: The Efficient Transformercited by 1,658
- 2020Rethinking Attention with Performerscited by 1,584
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
36 more
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2018Don't Give Me the Details, Just the Summary! Topic-Aware Convolutional Neural Networks for Extreme Summarizationcited by 1,308
- 2021Improving language models by retrieving from trillions of tokenscited by 1,278
- 2019Energy and Policy Considerations for Deep Learning in NLPcited by 1,242
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,203
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
- 2016Abstractive Text Summarization Using Sequence-to-Sequence RNNs and Beyondcited by 809
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
- 2020Efficient Transformers: A Surveycited by 784
- 2017The NarrativeQA Reading Comprehension Challengecited by 590
- 2018A Discourse-Aware Attention Model for Abstractive Summarization of Long Documentscited by 477
- 2021A Dataset of Information-Seeking Questions and Answers Anchored in Research Paperscited by 475
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
- 2021QMSum: A New Benchmark for Query-based Multi-domain Meeting Summarizationcited by 363
- 2021FNet: Mixing Tokens with Fourier Transformscited by 343
- 2021Efficient Attentions for Long Document Summarizationcited by 342
- 2018Generating Wikipedia by Summarizing Long Sequencescited by 333
- 2022Memorizing Transformerscited by 219
- 2021BookSum: A Collection of Datasets for Long-form Narrative Summarizationcited by 184
- 2022SCROLLS: Standardized CompaRison Over Long Language Sequencescited by 170
- 2021ContractNLI: A Dataset for Document-level Natural Language Inference for Contractscited by 145
- 2019Hierarchical Transformers for Multi-Document Summarizationcited by 132
- 2020Fast Transformers with Clustered Attentioncited by 123
- 2022Training Language Models with Memory Augmentationcited by 112
- 2021SummScreen: A Dataset for Abstractive Screenplay Summarizationcited by 80
- 2022An Empirical Survey on Long Document Summarization: Datasets, Models and Metricscited by 74
- 2022Efficient Long-Text Understanding with Short-Text Modelscited by 71
- 2018Content Selection in Deep Learning Models of Summarizationcited by 64
- 2021Summ^N: A Multi-Stage Summarization Framework for Long Input Dialogues and Documentscited by 64
- 2019Avoiding Reasoning Shortcuts: Adversarial Evaluation, Training, and Model Development for Multi-Hop QAcited by 63
- 2021PRIMERA: Pyramid-based Masked Sentence Pre-training for Multi-document Summarizationcited by 62
- 2022Neuro-Symbolic Language Modeling with Automaton-augmented Retrievalcited by 60
- 2021Leveraging Pretrained Models for Automatic Summarization of Doctor-Patient Conversationscited by 42
- 2021Long Document Summarization in a Low Resource Setting using Pretrained Language Modelscited by 24
- 2020Cluster-Former: Clustering-based Sparse Transformer for Long-Range Dependency Encodingcited by 19
- 2022You can't pick your neighbors, or can you? When and how to rely on retrieval in the kNN-LMcited by 18
Built on by
Citing papers per year: 2023: 30; 2024: 60; 2025: 32; 2026: 5.
127 papers.
Sort:
By area:
- 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,422
- 2024Evaluating Very Long-Term Conversational Memory of LLM Agentscited by 800
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 375
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
- 2023Generating Images with Multimodal Language Modelscited by 259
- 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Modelscited by 232
- 2023CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Servingcited by 199
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 194
- 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 192
- 2023In-context Autoencoder for Context Compression in a Large Language Modelcited by 190
38 more
- 2025MoBA: Mixture of Block Attention for Long-Context LLMscited by 188
- 2023Efficient Large Language Models: A Surveycited by 183
- 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 175
- 2025Kimi Linear: An Expressive, Efficient Attention Architecturecited by 169
- 2024LLM Inference Unveiled: Survey and Roofline Model Insightscited by 147
- 2024How to Train Long-Context Language Models (Effectively)cited by 141
- 2024In-Context Learning with Long-Context Models: An In-Depth Explorationcited by 126
- 2024HELMET: How to Evaluate Long-Context Language Models Effectively and Thoroughlycited by 119
- 2024RetrievalAttention: Accelerating Long-Context LLM Inference via Vector Retrievalcited by 114
- 2024Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilizationcited by 97
- 2024Long-Context Language Modeling with Parallel Context Encodingcited by 84
- 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Surveycited by 71
- 2024Retrieval-Augmented Generation for Natural Language Processing: A Surveycited by 70
- 2023Tool Documentation Enables Zero-Shot Tool-Usage with Large Language Modelscited by 66
- 2024Human-inspired Episodic Memory for Infinite Context LLMscited by 62
- 2023BAMBOO: A Comprehensive Benchmark for Evaluating Long Text Modeling Capacities of Large Language Modelscited by 53
- 2023Text2KGBench: A Benchmark for Ontology-Driven Knowledge Graph Generation from Textcited by 48
- 2024Long Code Arena: a Set of Benchmarks for Long-Context Code Modelscited by 48
- 2024VisualWebArena: Evaluating Multimodal Agents on Realistic Visual Web Taskscited by 45
- 2024Memory3: Language Modeling with Explicit Memorycited by 39
- 2025DrDiff: Dynamic Routing Diffusion with Hierarchical Attention for Breaking the Efficiency-Quality Trade-offcited by 33
- 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Surveycited by 32
- 2024Hierarchical Context Merging: Better Long Context Understanding for Pre-trained LLMscited by 30
- 2024Training Tensor Attention Efficiently: From Cubic to Almost Linear Timecited by 29
- 2025LongProc: Benchmarking Long-Context Language Models on Long Procedural Generationcited by 28
- 2025Cognitive Memory in Large Language Modelscited by 28
- 2024What Does the Bot Say? Opportunities and Risks of Large Language Models in Social Media Bot Detectioncited by 24
- 2024Retaining Key Information under High Compression Ratios: Query-Guided Compressor for LLMscited by 24
- 2023Dodo: Dynamic Contextual Compression for Decoder-only LMscited by 23
- 2024Efficient Solutions For An Intriguing Failure of LLMs: Long Context Window Does Not Mean LLMs Can Analyze Long Sequences Flawlesslycited by 23
- 2023ByteSized32: A Corpus and Challenge Task for Generating Task-Specific World Models Expressed as Text Gamescited by 22
- 2024Perception Compressor: A Training-Free Prompt Compression Framework in Long Context Scenarioscited by 22
- 2023Retrieval-Pretrained Transformer: Long-range Language Modeling with Self-retrievalcited by 20
- 2024HMT: Hierarchical Memory Transformer for Efficient Long Context Language Processingcited by 20
- 2023TextGenSHAP: Scalable Post-hoc Explanations in Text Generation with Long Documentscited by 17
- 2024Leveraging Visual Tokens for Extended Text Contexts in Multi-Modal Learningcited by 17
- 2023Large Language Models Meet Open-World Intent Discovery and Recognition: An Evaluation of ChatGPTcited by 16
50 most cited of 127 All 127 (JSON)
- 2026DimPO: Dimensionality Reduction for Attention using Preference Optimization26 Sep 2026
- 2026RH-RAG: Trustworthy Long-Form Generation for Privacy-Constrained Settings2 Aug 2026
- 2026Fractional Decay KV-Cache: Ownership-Aware Memory Management for Improved Inference Relevancy in Dialog Systems9 Jun 2026
- 2026Training Long-Context Vision-Language Models Effectively with Generalization Beyond 128K Context13 May 2026
- 2026DySCO: Dynamic Attention-Scaling Decoding for Long-Context Language Models25 Feb 2026
- 2025Unifying Convolution and Attention via Convolutional Nearest Neighbors18 Nov 2025
- 2025Batch Transformer Architecture: Case of Synthetic Image Generation for Emotion Expression Facial Recognition13 Nov 2025
- 2025Kimi Linear: An Expressive, Efficient Attention Architecture30 Oct 2025
- 2025Beyond Length: Quantifying Long-Range Information for Long-Context LLM Pretraining Data29 Oct 2025
- 2025Revisiting Long-context Modeling from Context Denoising Perspective7 Oct 2025
- 2025ResFormer: All-Time Reservoir Memory for Long Sequence Classification28 Sep 2025
- 2025Learning to Summarize by Learning to Quiz: Adversarial Agentic Collaboration for Long Document Summarization25 Sep 2025
38 more
- 2025ShadowServe: Interference-Free KV Cache Fetching for Distributed Prefix Caching21 Sep 2025
- 2025Context-Aware Language Models for Forecasting Market Impact from Sequences of Financial News15 Sep 2025
- 2025DrDiff: Dynamic Routing Diffusion with Hierarchical Attention for Breaking the Efficiency-Quality Trade-off2 Sep 2025
- 2025Relational inductive biases on attention mechanisms5 Jul 2025
- 2025RATTENTION: Towards the Minimal Sliding Window Size in Local-Global Attention Models18 Jun 2025
- 2025AbsenceBench: Language Models Can't Tell What's Missing13 Jun 2025
- 2025Dynamic Chunking and Selection for Reading Comprehension of Ultra-Long Context in Large Language Models1 Jun 2025
- 2025NexusSum: Hierarchical LLM Agents for Long-Form Narrative Summarization30 May 2025
- 2025VIBE: Vector Index Benchmark for Embeddings23 May 2025
- 2025TextTIGER: Text-based Intelligent Generation with Entity Prompt Refinement for Text-to-Image Generation25 Apr 2025
- 2025Unsupervised Location Mapping for Narrative Corpora8 Apr 2025
- 2025Cognitive Memory in Large Language Models3 Apr 2025
- 2025Context-Efficient Retrieval with Factual Decomposition25 Mar 2025
- 2025A Survey on Transformer Context Extension: Approaches and Evaluation17 Mar 2025
- 2025Radar: Fast Long-Context Decoding for Any Transformer13 Mar 2025
- 2025Machine learning and high dimensional vector search24 Feb 2025
- 2025WildLong: Synthesizing Realistic Long-Context Instruction Data at Scale23 Feb 2025
- 2025MoBA: Mixture of Block Attention for Long-Context LLMs18 Feb 2025
- 2025Inference-time sparse attention with asymmetric indexing12 Feb 2025
- 2025LV-XAttn: Distributed Cross-Attention for Long Visual Inputs in Multimodal Large Language Models4 Feb 2025
- 2025Context-Aware Hierarchical Merging for Long Document Summarization3 Feb 2025
- 2025ZETA: Leveraging Z-order Curves for Efficient Top-k Attention24 Jan 2025
- 2025CoPERLex: Content Planning with Event-based Representations for Legal Case Summarization23 Jan 2025
- 2025LongProc: Benchmarking Long-Context Language Models on Long Procedural Generation9 Jan 2025
- 2025End-to-End Long Document Summarization using Gradient Caching3 Jan 2025
- 2024CNNSum: Exploring Long-Context Summarization with Large Language Models in Chinese Novels3 Dec 2024
- 2024When Precision Meets Position: BFloat16 Breaks Down RoPE in Long-Context Training20 Nov 2024
- 2024RefreshKV: Updating Small KV Cache During Long-form Generation8 Nov 2024
- 2024kNN Attention Demystified: A Theoretical Exploration for Scalable Transformers6 Nov 2024
- 2024Mesa-Extrapolation: A Weave Position Encoding Method for Enhanced Extrapolation in LLMs21 Oct 2024
- 2024Modelling Concurrent RTP Flows for End-to-end Predictions of QoS in Real Time Communications21 Oct 2024
- 2024BookWorm: A Dataset for Character Description and Analysis14 Oct 2024
- 2024LexSumm and LexT5: Benchmarking and Modeling Legal Summarization Tasks in English12 Oct 2024
- 2024A Novel LLM-based Two-stage Summarization Approach for Long Dialogues9 Oct 2024
- 2024Automatic Summarization of Long Documents8 Oct 2024
- 2024UncertaintyRAG: Span-Level Uncertainty Enhanced Long-Context Modeling for Retrieval-Augmented Generation3 Oct 2024
- 2024HELMET: How to Evaluate Long-Context Language Models Effectively and Thoroughly3 Oct 2024
- 2024How to Train Long-Context Language Models (Effectively)3 Oct 2024
50 newest of 127 All 127 (JSON)
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
- 2023CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Servingcited by 199
- 2023In-context Autoencoder for Context Compression in a Large Language Modelcited by 190
- 2024LLM Inference Unveiled: Survey and Roofline Model Insightscited by 147
- 2024Retaining Key Information under High Compression Ratios: Query-Guided Compressor for LLMscited by 24
- 2024Perception Compressor: A Training-Free Prompt Compression Framework in Long Context Scenarioscited by 22
- 2024RefreshKV: Updating Small KV Cache During Long-form Generationcited by 11
- 2024QuickLLaMA: Query-aware Inference Acceleration for Large Language Modelscited by 4
- 2025ShadowServe: Interference-Free KV Cache Fetching for Distributed Prefix Cachingcited by 3
- 2026Fractional Decay KV-Cache: Ownership-Aware Memory Management for Improved Inference Relevancy in Dialog Systemscited by 0
- 2026Fractional Decay KV-Cache: Ownership-Aware Memory Management for Improved Inference Relevancy in Dialog Systems9 Jun 2026
- 2025ShadowServe: Interference-Free KV Cache Fetching for Distributed Prefix Caching21 Sep 2025
- 2024RefreshKV: Updating Small KV Cache During Long-form Generation8 Nov 2024
- 2024Perception Compressor: A Training-Free Prompt Compression Framework in Long Context Scenarios28 Sep 2024
- 2024QuickLLaMA: Query-aware Inference Acceleration for Large Language Models11 Jun 2024
- 2024Retaining Key Information under High Compression Ratios: Query-Guided Compressor for LLMs4 Jun 2024
- 2024LLM Inference Unveiled: Survey and Roofline Model Insights26 Feb 2024
- 2023CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving11 Oct 2023
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compression10 Oct 2023
- 2023In-context Autoencoder for Context Compression in a Large Language Model13 Jul 2023
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2024Retrieval-Augmented Generation for Natural Language Processing: A Surveycited by 70
- 2024Memory3: Language Modeling with Explicit Memorycited by 39
- 2023Retrieval-Pretrained Transformer: Long-range Language Modeling with Self-retrievalcited by 20
- 2024UncertaintyRAG: Span-Level Uncertainty Enhanced Long-Context Modeling for Retrieval-Augmented Generationcited by 14
- 2024Toward Conversational Agents with Context and Time Sensitive Long-term Memorycited by 8
- 2024You Only Use Reactive Attention Slice For Long Context Retrievalcited by 1
- 2024UncertaintyRAG: Span-Level Uncertainty Enhanced Long-Context Modeling for Retrieval-Augmented Generation3 Oct 2024
- 2024You Only Use Reactive Attention Slice For Long Context Retrieval3 Sep 2024
- 2024Retrieval-Augmented Generation for Natural Language Processing: A Survey18 Jul 2024
- 2024Memory3: Language Modeling with Explicit Memory1 Jul 2024
- 2024Toward Conversational Agents with Context and Time Sensitive Long-term Memory29 May 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2023Retrieval-Pretrained Transformer: Long-range Language Modeling with Self-retrieval23 Jun 2023
- 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,422
- 2024Evaluating Very Long-Term Conversational Memory of LLM Agentscited by 800
- 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 192
- 2024VisualWebArena: Evaluating Multimodal Agents on Realistic Visual Web Taskscited by 45
- 2025NexusSum: Hierarchical LLM Agents for Long-Form Narrative Summarizationcited by 10
- 2025Learning to Summarize by Learning to Quiz: Adversarial Agentic Collaboration for Long Document Summarizationcited by 1
- 2025Learning to Summarize by Learning to Quiz: Adversarial Agentic Collaboration for Long Document Summarization25 Sep 2025
- 2025NexusSum: Hierarchical LLM Agents for Long-Form Narrative Summarization30 May 2025
- 2024Evaluating Very Long-Term Conversational Memory of LLM Agents27 Feb 2024
- 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memory7 Feb 2024
- 2024VisualWebArena: Evaluating Multimodal Agents on Realistic Visual Web Tasks24 Jan 2024
- 2023The Rise and Potential of Large Language Model Based Agents: A Survey14 Sep 2023
- 2025MoBA: Mixture of Block Attention for Long-Context LLMscited by 188
- 2025MoBA: Mixture of Block Attention for Long-Context LLMs18 Feb 2025
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 375
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
- 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Modelscited by 232
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 194
- 2023Efficient Large Language Models: A Surveycited by 183
- 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 175
- 2025Kimi Linear: An Expressive, Efficient Attention Architecturecited by 169
- 2024How to Train Long-Context Language Models (Effectively)cited by 141
- 2024In-Context Learning with Long-Context Models: An In-Depth Explorationcited by 126
- 2024HELMET: How to Evaluate Long-Context Language Models Effectively and Thoroughlycited by 119
- 2024RetrievalAttention: Accelerating Long-Context LLM Inference via Vector Retrievalcited by 114
- 2024Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilizationcited by 97
12 most cited of 96 All 96 (JSON)
- 2026RH-RAG: Trustworthy Long-Form Generation for Privacy-Constrained Settings2 Aug 2026
- 2026DySCO: Dynamic Attention-Scaling Decoding for Long-Context Language Models25 Feb 2026
- 2025Unifying Convolution and Attention via Convolutional Nearest Neighbors18 Nov 2025
- 2025Batch Transformer Architecture: Case of Synthetic Image Generation for Emotion Expression Facial Recognition13 Nov 2025
- 2025Kimi Linear: An Expressive, Efficient Attention Architecture30 Oct 2025
- 2025Revisiting Long-context Modeling from Context Denoising Perspective7 Oct 2025
- 2025ResFormer: All-Time Reservoir Memory for Long Sequence Classification28 Sep 2025
- 2025Context-Aware Language Models for Forecasting Market Impact from Sequences of Financial News15 Sep 2025
- 2025DrDiff: Dynamic Routing Diffusion with Hierarchical Attention for Breaking the Efficiency-Quality Trade-off2 Sep 2025
- 2025Relational inductive biases on attention mechanisms5 Jul 2025
- 2025RATTENTION: Towards the Minimal Sliding Window Size in Local-Global Attention Models18 Jun 2025
- 2025AbsenceBench: Language Models Can't Tell What's Missing13 Jun 2025
12 newest of 96 All 96 (JSON)