Two are better than one: Context window extension with multi-grained self-injection
Not on the map. Why?
Abstract (arXiv)
The limited context window of contemporary large language models (LLMs) remains a huge barrier to their broader application across various domains. While continual pre-training on long-context data is a straightforward and effective solution, it incurs substantial costs in terms of data acquisition and computational resources. To alleviate this issue, we propose SharedLLM, a novel approach grounded in the design philosophy of multi-grained context compression and query-aware information retrieval. SharedLLM is composed of two short-context LLMs such as LLaMA-2, termed upper model and lower model. The lower model functions as a compressor while the upper model acts as a decoder. The upper model receives compressed, multi-grained context information from the lower model and performs context-aware modeling on the running text. Information transfer between the compressor and decoder occurs only at the lowest layers to refrain from long forward paths in the lower model and redundant cross-attention modules in the upper model. Based on this architecture, we introduce a specialized tree-style data structure to efficiently encode, store and retrieve multi-grained contextual information for text chunks. This structure, combined with a search algorithm, enables rapid encoding and retrieval of relevant information from various levels of the tree based on the input query. This entire process, wherein the sender and receiver are derived from the same LLM layer, is referred to as self-injection.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 37 of its 44 references that are in the map. First posted on arXiv 25 Oct 2024.
Builds on
37 of 44 references.
References · 37
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2020Longformer: The Long-Document Transformercited by 3,413
25 more
- 2023Mistral 7Bcited by 3,164
- 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2024From Local to Global: A Graph RAG Approach to Query-Focused Summarizationcited by 1,453
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2024ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Toolscited by 1,121
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
- 2023Llemma: An Open Language Model For Mathematicscited by 388
- 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 367
- 2023Adapting Language Models to Compress Contextscited by 356
- 2023Effective Long-Context Scaling of Foundation Modelscited by 303
- 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 204
- 2024Data Engineering for Scaling Language Models to 128K Contextcited by 186
- 2023Focused Transformer: Contrastive Training for Context Scalingcited by 133
- 2024Long-Context Language Modeling with Parallel Context Encodingcited by 84
- 2024Evaluating Quantized Large Language Modelscited by 77
- 2024Training-Free Long-Context Scaling of Large Language Modelscited by 62
- 2024Two Stones Hit One Bird: Bilevel Positional Encoding for Better Length Extrapolationcited by 24
- 2024Extending Llama-3's Context Ten-Fold Overnightcited by 15
Built on by
Citing papers per year: 2025: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Stacked from One: Multi-Scale Self-Injection for Context Window Extension
- 2022Parallel Context Windows for Large Language Models
- 2024Recurrent Context Compression: Efficiently Expanding the Context Window of LLM
- 2023Retrieval meets Long Context Large Language Models
- 2024Enhancing and Accelerating Large Language Models via Instruction-Aware Contextual Compression
- 2024FocusLLM: Precise Understanding of Long Context by Dynamic Condensing
- 2024Contextual Compression in Retrieval-Augmented Generation for Large Language Models: A Survey
- 2025Beyond Hard and Soft: Hybrid Context Compression for Balancing Local and Global Information Retention