mlsanityData to 7 Oct 2026

Stacked from One: Multi-Scale Self-Injection for Context Window Extension

arXiv 2603.04759 ↗First posted 5 Mar 2026cs.CL cs.AIcited by 0

On the map: Efficient LLM inference and serving → Prompt and context compression

Abstract (arXiv)

The limited context window of contemporary large language models (LLMs) remains a primary bottleneck for their broader application across diverse domains. Although continual pre-training on long-context data offers a straightforward solution, it incurs prohibitive data acquisition and computational costs. To address this challenge, we propose~modelname, a novel framework based on multi-grained context compression and query-aware information acquisition. SharedLLM comprises two stacked short-context LLMs: a lower model serving as a compressor and an upper model acting as a decoder. The lower model compresses long inputs into compact, multi-grained representations, which are then forwarded to the upper model for context-aware processing. To maximize efficiency, this information transfer occurs exclusively at the lowest layers, bypassing lengthy forward passes and redundant cross-attention operations. This entire process, wherein the upper and lower models are derived from the same underlying LLM layers, is termed~textitself-injection. To support this architecture, a specialized tree-based data structure enables the efficient encoding and query-aware retrieval of contextual information. Despite being trained on sequences of only 8K tokens, modelname~effectively generalizes to inputs exceeding 128K tokens. Across a comprehensive suite of long-context modeling and understanding benchmarks, modelname~achieves performance superior or comparable to strong baselines, striking an optimal balance between efficiency and accuracy. Furthermore, these design choices allow modelname~to substantially reduce the memory footprint and yield notable inference speedups (2× over streaming and 3× over encoder-decoder architectures).

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Prompt and context compression, one of 12 directions in Efficient LLM inference and serving. Builds on 44 of its 53 references that are in the map. First posted on arXiv 5 Mar 2026.

Builds on

44 of 53 references.

Closest ancestors · 2

Same direction, newest first

  1. 2024Long Context Compression with Activation Beacon7 Jan
  2. 2023In-context Autoencoder for Context Compression in a Large Language Model13 Jul

Other references · 42

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  4. 2024The Llama 3 Herd of Modelscited by 14,192
  5. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  6. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  7. 2025Qwen3 Technical Reportcited by 8,195
  8. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  9. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  10. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
  11. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
  12. 2020Longformer: The Long-Document Transformercited by 3,362
30 more
  1. 2023Mistral 7Bcited by 3,065
  2. 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
  3. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
  4. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  5. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  6. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
  7. 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
  8. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
  9. 2024ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Toolscited by 1,096
  10. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
  11. 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 848
  12. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
  13. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
  14. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
  15. 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMscited by 466
  16. 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 360
  17. 2023Adapting Language Models to Compress Contextscited by 350
  18. 2023Effective Long-Context Scaling of Foundation Modelscited by 301
  19. 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 201
  20. 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
  21. 2023Focused Transformer: Contrastive Training for Context Scalingcited by 133
  22. 2023LM-Infinite: Zero-Shot Extreme Length Generalization for Large Language Modelscited by 120
  23. 2025A Comprehensive Survey on Long Context Language Modelingcited by 113
  24. 2019On the Use of ArXiv as a Datasetcited by 101
  25. 2024Long-Context Language Modeling with Parallel Context Encodingcited by 84
  26. 2024Training-Free Long-Context Scaling of Large Language Modelscited by 61
  27. 2024Megalodon: Efficient LLM Pretraining and Inference with Unlimited Context Lengthcited by 46
  28. 2024Two Stones Hit One Bird: Bilevel Positional Encoding for Better Length Extrapolationcited by 23
  29. 2025M1: Towards Scalable Test-Time Compute with Mamba Reasoning Modelscited by 21
  30. 2024Extending Llama-3's Context Ten-Fold Overnightcited by 15

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2024Two are better than one: Context window extension with multi-grained self-injection
  2. 2022Parallel Context Windows for Large Language Models
  3. 2024Flexibly Scaling Large Language Models Contexts Through Extensible Tokenization
  4. 2024Enhancing and Accelerating Large Language Models via Instruction-Aware Contextual Compression
  5. 2024Recurrent Context Compression: Efficiently Expanding the Context Window of LLM
  6. 2025Autoencoding-Free Context Compression for LLMs via Contextual Semantic Anchors
  7. 2025ILRe: Intermediate Layer Retrieval for Context Compression in Causal Language Models
  8. 2026Compressing Long Context into Answer-Aligned Memory Embeddings for LLM Inference