A Comprehensive Survey on Long Context
Language Modeling
Abstract
Efficient processing of long contexts has been a persistent pursuit in Natural Language Processing. With the growing number of long documents, dialogues, and other textual data, it is important to develop Long Context Language Models (LCLMs) that can process and analyze extensive inputs in an effective and efficient way. In this paper, we present a comprehensive survey on recent advances in long-context modeling for large language models. Our survey is structured around three key aspects: how to obtain effective and efficient LCLMs, how to train and deploy LCLMs efficiently, and how to evaluate and analyze LCLMs comprehensively. For the first aspect, we discuss data strategies, architectural designs, and workflow approaches oriented with long context processing. For the second aspect, we provide a detailed examination of the infrastructure required for LCLM training and inference. For the third aspect, we present evaluation paradigms for long-context comprehension and long-form generation, as well as behavioral analysis and mechanism interpretability of LCLMs. Beyond these three key aspects, we thoroughly explore the diverse application scenarios where existing LCLMs have been deployed and outline promising future development directions. This survey provides an up-to-date review of the literature on long-context LLMs, which we wish to serve as a valuable resource for both researchers and engineers. An associated GitHub repository collecting the latest papers and repos is available at: LCLM-Horizon.
Contents
- 1 Introduction
- 2 Data
- 3 Architecture
- 4 Workflow Design
- 5 Infrastructure
- 6 Evaluation
- 7 Analysis
- 8 Application
- 9 Future Directions
- 9.1 Long Context Modeling for o1-like Long Reasoning
- 9.2 Further Extending Context Window and Improving Modeling Capabilities
- 9.3 Efficient Architecture Design, Training, and Deployment of LCLMs
- 9.4 More Reliable Evaluation Framework for Long Context Language Modeling
- 9.5 Towards Mechanistical Interpretability for Long Context Modeling
- 10 Conclusion
- 11 Contributions and Acknowledgments
- References
1 Introduction
Efficient data processing has long been humanity’s aspiration, as our biological constraints limit us to localized, serial reading, making the manual processing of long-context of data painfully inefficient. As shown in Figure 1, considering these historical moments: In 300 BCE, librarians at the Library of Alexandria had to manually copy, proofread manuscripts, and compile catalogs to manage hundreds of thousands of ancient texts [561]. In the 800s, astronomical officials of the Tang Dynasty needed to manually process vast astronomical measurement data to calculate seasonal divisions [560]. In the 1400s, typesetters had to manually arrange enormous printing plates before newspapers could be printed [559]. Even into the 1900s, scholars still needed to meticulously examine dozens or even hundreds of relevant documents before achieving a comprehensive understanding of a subject.
A revolutionary leap finally arrived with the emergence of language models [552, 641, 42, 322, 574, 507, 109, 643, 198, 314, 608, 609], which offer the promise of automatically processing text data in minutes. These language models operate within a fixed context window, probabilistically modeling input sequences and enabling next-token prediction. Early language models were limited to processing only a few or dozens of tokens [447, 36, 61, 363]. As context lengths expanded to several hundred or thousands of tokens, represented by BERT [101] and GPT-3 [37] respectively, automatic processing of paragraphs, documents, and multi-turn conversations became achievable for the first time. Building on these advances, recent years have witnessed the advent of Long Context Language Models (LCLMs) with their context length growing exponentially from 4K to 128K [155], 1M [604] and even 10M [503] tokens, enabling single-pass ingestion of Tolstoyan-scale narratives (560K words) and effectively condensing 60 hours of human reading into minutes of computational processing. More importantly, these extensive context lengths provide sufficient space for test-time scaling [386, 166], where models can explore, reflect, backtrack, and summarize within a single context, which fundamentally transforms our interaction with generative AI and unlocks a series of intriguing abilities, including: o1-like long reasoning [166, 386, 374], complex agent workflows [510], superior in-context learning [367, 503], efficient information retrieval & comprehension [536, 264], and advanced multimodal intelligence [511, 557].
In this paper, we present a comprehensive survey on long context language modeling. As shown in Figure 2, our survey is oriented with the following three pivotal dimensions: RQ1: How to obtain effective and efficient LCLMs? RQ2: How to train and deploy LCLMs efficiently? RQ3: How to evaluate and analyze LCLMs comprehensively? Beyond these three key aspects, we also thoroughly explore the diverse application scenarios of existing LCLMs.
First, to obtain effective and efficient LCLMs (RQ1), we review data strategies (§ 2), architecture designs (§ 3), and workflow design (§ 4). For data strategies, we provide a detailed discussion on data engineering works for building LCLMs across both pre-training and post-training phase, including data selection, data filtering, data synthesis, data mixture, etc. For architecture design, we first examine position embeddings commonly adopted by LCLMs, and their extrapolation strategies, then we systematically discuss three major types of architectural designs: transformer-based modifications, linear-complexity architectures, and hybrid approaches that integrate both paradigms. On top of this, we further introduce workflow designs that expand the scope of a single LCLM, including prompt compression, memory-based workflow, RAG-based workflow, and agent-based workflow.
Second, in order to efficiently train and deploy LCLMs (RQ2), we thoroughly summarize AI infrastructure optimization strategies (§ 5). For training infrastructure, we examine I/O optimization, optimizations on GPU constraints & memory access, and optimizations on communication-computation overlapping. For inference infrastructure, we review five types of efficient inference strategies, including quantization, memory management, prefilling-decoding disaggregated architecture, GPU-CPU parallel inference, and speculative decoding.
Third, building on top of effective LCLMs and efficient infrastructure, we proceed to discuss their performance evaluation (§ 6) and analysis (§ 7) (RQ3). The evaluation section divides long context capabilities into two broad categories: long context comprehension and long-form generation. For each category, we discuss the evaluation paradigm, and present an overview of existing benchmarks. For the analysis section, we include both the external performance analysis (e.g., the effective context length, PPL metric, lost-in-the-middle) and the internal model structure analysis (e.g., position embedding, attention head, mlp layers).
Finally, in Section 8, we summarize the main applications for long context large language models (LLMs), including the agent, RAG, Code, multimodal tasks and etc, and in Section 9, we propose five potential future directions for LCLMs including the long Chain-of-Thought reasoning, effective long context extension, efficient architecture and infrastructure, robust evaluation, and mechanistic interpretability.
As shown in Table 1, we also compare with this survey paper with existing surveys [327, 108, 399] on long context modeling, and we observe that existing surveys usually focus on several specific topics in long context modeling. In contrast, this comprehensive survey provides an in-depth exploration of the rapidly evolving landscape of LCLMs, and address the aforementioned RQs for long context modeling by covering a wide range of topics.
In summary, by providing a comprehensive overview of the current state of long context language models, this survey aims to serve as a valuable resource for researchers, practitioners, and enthusiasts in the field of NLP. We hope to shed light on the progress made thus far, highlight the remaining challenges, and inspire future innovations in this exciting research area.
| Survey | Data | Architecture | Workflow Design | Infrastructure | Evaluation | Analysis |
|---|---|---|---|---|---|---|
| Huang et al. [200] | ||||||
| Zhao et al. [674] | ||||||
| Li et al. [299] | ||||||
| Dong et al. [108] | ||||||
| Ours |
2 Data
In this section, we discuss the data-related topics for long context modeling. Specifically, as shown in Figure 3, the long context data is used both in the pre-training and post-training stages. To illustrate the data processing pipeline for LCLMs, we first provide the data strategies of long context pre-training data (§ 2.1), including data filtering, data mixture and data synthesis. Then, we illustrate the data strategies of long context post-training data (§ 2.2), including data filtering and data synthesis.
2.1 Pre-training
2.1.1 Data Filtering
Foundation models’ performance is significantly influenced by the quality of pre-training data as shown in many studies [422, 163, 110, 643], and various approaches have been employed to enhance data quality. Specifically, some works [425, 466, 643] have implemented many heuristic rules (e.g., removing short entries) and duplication methods (e.g., MinHashLSH deduplication [269]) to improve the data quality. Besides, SemDeDup [1] is proposed to utilize the embeddings from existing pre-trained models to remove semantic duplicates. In addition, several methods have been proposed to improve the diversity and complexity of the data. For example, Maharana et al. [353] viewed diversity and difficulty as complementary factors, employing a dataset graph with bidirectional message passing for data selection, and Tirumala et al. [514] applied clustering techniques to broaden the data diversity. Nevertheless, the aforementioned approaches primarily address standard pre-training datasets, typically limited to 4,000 or 8,000 tokens. Recently, researchers have developed specialized criteria to evaluate the quality of extended context from various perspectives. For example, the work [328] introduced a comprehensive framework for assessing the quality of long texts, which mainly includes three core linguistic aspects: coherence, cohesion, and complexity. To quantify these aspects, various metrics including statistical measures and evaluations based on pre-trained language models have been proposed. Meanwhile, apart from Longwanjuan, another representative work [58] is proposed to evaluate training samples based on their long-range dependency characteristics. This approach also utilizes three key metrics (i.e., dependency strength, dependency distance, dependency specificity) to assess and prioritize samples that are particularly beneficial for enhancing models’ long context comprehension. Recently, some works have begun to use the attention pattern to select high-quality long context data. For example, the LongAttn [569] uses the self-attention mechanism to quantify the long long-range dependencies for accurate and efficient data selection.
2.1.2 Data Mixture
Language model training typically utilizes datasets drawn from diverse sources [37, 83, 111, 133, 136]. For instance, The Pile [133], a widely accessible dataset, comprises various components including 24% web content, 9% Wikipedia, and 4% GitHub, etc. Besides, many works have observed that the composition of pre-training data significantly impacts an LM’s performance [111, 185], and current approaches to determining domain weights (sampling probabilities for each source) often rely on intuition or specific downstream tasks. For example, The Pile employs heuristically chosen weights, which may not be optimal. PaLM [83] and GLaM [111] fine-tune these weights based on selected downstream tasks, which need to training numerous LMs with different weight configurations. To address this limitation, Data Mixing Laws [622] and RegMix [321] investigate the data-mixing scaling law to find the optimal domain mixture for improving the pre-training efficiency with minimal training costs. However, the above-mentioned methods usually focus on pre-training data within limited context windows (e.g., 4k/8k), and several works have begun to focus on the data mixture on the long context pre-training. For example, [128] explore five types of long context data composition including “Cutting documents at 4K”, “Cutting documents at 128K”, “Global upsampling”, “Per-source upsampling” and “Upsampling Arxiv / Book / Github” and have following observations: (1) Continual pre-training on a small amount of long context data can significantly improve a 7B model’s capability to accurately retrieve information over long context input. (2) When scaling up context length, it is crucial to oversample lengthy sequences while maintaining the original domain diversity of the pre-training datasets. ProLong [136] shows that incorporating code repositories and long books as long context sources, and mixing them with high-quality short-context sources is vital for improving performance on extended inputs while preserving the model’s proficiency with short contexts. The GrowLength approach [228] progressively expands the input size throughout the pre-training process, optimizing computational resources and boosting efficiency.
2.1.3 Data Synthesis
As the long context data is usually rare in the real-world corpus (e.g., web documents), many methods have been proposed to synthesize or construct the long context pre-training data. For example, one approach clusters semantically related texts within a single context window [168], while another work [273] demonstrates improved sentence representations by incorporating related, non-adjacent sentences in pre-training examples. Besides, to address document redundancy, a traveling salesman algorithm has been employed in ICP [458]. Moreover, SPLICE [474] involves structured packing, where training samples are created by combining multiple similar retrieved documents. Additionally, a query-centric synthesis method Quest [131] has been proposed to aggregate diverse yet semantically linked documents. This approach utilizes a generative model to predict potential queries for each document, subsequently grouping documents with similar queries and keywords. Another method [512] creates complex "knotted" text structures by shuffling document chunks, training models to untangle and locate relevant segments, thereby improving both contextual attention and training efficiency.
2.2 Post-training
2.2.1 Data Filtering
Unlike pre-training, the data filtering strategy in post-training usually aims to select influential samples to empower the LLMs’ instruction-following capabilities. Chen et al. [57], Liu et al. [325], Chen et al. [54], Wu et al. [569] explore the use of feedback from proprietary language models to curate training samples. Meanwhile, Cao et al. [41], Li et al. [283], Ge et al. [142], Xia et al. [585] have developed sophisticated metrics based on open-source LLMs to evaluate the importance of samples. However, these methods only focus on selecting short-from SFT data, overlooking the specific challenges posed by long context alignment. Recently, the GATEAU [464] introduces two components (i.e., Homologous Models’ Guidance and Contextual Awareness Measurement) to identify the influential samples with long-range dependency relations.
| Training Data | Characteristics | Stage |
| Longwanjuan [328] | Bilingual, filtered from SlimPajama [466] and Wanjuan [173] | Pre-training |
| Long-Data-Collections [336] | A wide variety of data sources | Pre-training |
| LongAttn [569] | Long-range dependency selected using attention patterns | Pre-training |
| LongAlign [16] | Diverse tasks and various sources, Self-Instruct | Post-training |
| FILM [11] | Information-Intensive, context length balance, multi-hop reasoning | Post-training |
| PAM QA [176] | Position-agnostic, multi-hop reasoning | Post-training |
| LongAlpaca [69] | Self-collected, instruction following | Post-training |
| ChatQA2 [598] | Synthesized from NarrativeQA [247] | Post-training |
| LongMIT [71] | Multi-hop, diverse, automatic | Post-training |
| LongWriter-6k [19] | Long-form generation, output lengths ranging from 2k to 32k word | Post-training |
| Long Reward [646] | Bilingual, preference optimization | Post-training |
| LOGO [497] | Preference optimization | Post-training |
| LongDPO [407] | Long-form Generation, preference optimization, step-level | Post-training |
| LongFaith [606] | Faithfulness, reasoning, preference optimization | Post-training |
2.2.2 Data Synthesis
For the data synthesis of post-training, we need to construct the long context queries effectively, and many works have been proposed. For example, Ziya-Reader [176] constructs a tailored Multi-doc QA task that requires concentration on different positions in contexts to address the “lost in the middle” problem [319]. Xiong et al. [591] proposes to select a document from pre-training corpus and prompt the language model to write question-answer pairs based on information in the selected chunk. Recently, An et al. [11] presents information-intensive training to overcome lost-in-the-middle, which leverages a synthesized long context question-answer dataset including two types of questions (i.e., fine-grained information awareness on exactly one short segment, and the integration and reasoning of information from two or more segments). Xu et al. [598] introduce to assemble all the related paragraphs and randomly insert the ground truth summary to simulate a real long document for obtaining long context instructions. Chen et al. [71] propose the Multi-agent Interactive Multihop Generation (MIMG) framework, incorporating a Quality Verification Agent, a Single-hop Question Generation Agent, a Multiple Question Sampling Strategy, and a Multi-hop Question Merger Agent, to improve the quality of long context instruction data.
Recently, several works [497, 646] have begun to focus the preference optimization on long context models [424, 389] to align models with human preferences. A representative work DPO [424] can eliminate the need for a separate reward model, and teach the model to “reject” misaligned responses and “accept” preferred responses with differently assigned prediction scores. Meanwhile, many efforts have been made to enhance the effectiveness and efficiency of DPO, such as SimPO [360], ORPO [186], TPO [439], 2D-DPO [289], and Constitutional DPO [544]. However, these diverse approaches mainly focus on short-context scenarios, and the long context preference optimization is ignored. Recently, several works for long context preference optimization have been proposed. For example, LongReward [646] utilizes an off-the-shelf LLM to provide rewards for long context model responses from four human-valued dimensions: helpfulness, logicality, faithfulness, and completeness, and then obtain the preference pairs based on the synthesized queries. LOGO [496] introduces the importance of scoring with an automatic evaluator to synthesize preference (aligned) and dispreference (misaligned) data in long context comprehension scenarios. More recently, long context generation has drawn great attentions, and Ping et al. [407] propose the LongDPO method, which uses the Monte Carlo Tree Search to gather stepwise preference pairs and adopt the step-level DPO to improve the capabilities of existing LLMs.
2.3 Training Data
Summary on the long context datasets for pre-training and post-training are as shown in Table 2.
3 Architecture
For long context language models, architectural design faces dual challenges: effectively processing extremely long texts while maintaining computational efficiency in both training and inference phases. This section presents a comprehensive review of architectural designs tailored for long context modeling. First, we examine position embeddings commonly adopted by LCLMs, and their extrapolation strategies (§ 3.1). Then, we systematically discuss three major types of architectural designs: transformer-based modifications (§ 3.2.1), linear-complexity architectures (§ 3.2.2), and hybrid approaches that integrate both paradigms (§ 3.2.3).
3.1 Position Embeddings
Most long context LLMs are based on the popular Transformer architecture. Since the Transformer computes the representations of all tokens in parallel, it is necessary to integrate positional information within the sequence with the aid of positional encoding. In this subsection, we will first introduce different types of positional embeddings used in the Transformer, and then demonstrate the extrapolation methods for adapting the positional encoding to larger sequence lengths.
3.1.1 Position Embedding Types
As shown in Table 3, positional embeddings in LLMs can be classified into absolute positional embeddings, relative positional embeddings, and content-aware positional embeddings according to the form of their positional information.
Absolute Position Embedding
Absolute Position Embedding provides each token with information about its absolute position in the sequence. This approach can be categorized into three types: (1) directly specifying the positional embedding (PE) for each position through a functional approach; (2) setting the PE for each position as trainable vectors that are updated during training; and (3) omitting positional embeddings entirely and relying on unidirectional attention in decoder-only architectures to learn positions implicitly. Below are the details:
- •
Functional Positional Embedding [518]. The most representative example of functional position embedding is Sinusoidal Positional Embedding, which was proposed by the vanilla Transformer [518] and was widely used in variant models based on Transformers. It encodes positional information through periodic sine and cosine functions. In Transformer, it is usually added to word embeddings to inject absolute positional information into the network.
- •
Learned Positional Embedding [143]. It was firstly proposed by Meta to introduce positional information into the convolutional sequence-to-sequence learning. The embedding representations of different positions are treated as learnable parameters and trained along with the network. This is widely used in models such as BERT [101], GPT [37], and OPT [656]. There are also some variants [525] that represents the position embedding in the complex plane and combines it with the continuous word embedding which is also represented in complex vectors.
- •
No Position Embedding (NoPE) [74, 241]. NoPE proposes to incorporate no explicit position encoding into Transformer. It founds that the model still learns the permutation order of tokens. NoPE is also effective in language modeling and several probing tasks. [74] prove that NoPE in causal language models can incorporate implicit absolute positional information into the models. Note that NoPE also conveys relative positional information [241].
Relative Position Embedding
Instead of focusing on absolute positional information, Relative Position Embedding [453] captures the relative distances between tokens, as it assumes that relative positional information is more crucial for language understanding. For LCLMs, commonly used Relative Position Embeddings can be categorized into following three types:
| Category | Position Embedding | Parametric | Representation | Injection Method |
|---|---|---|---|---|
| Absolute | Sinusoidal [518] | ✗ | Embedding | Add |
| Learned [143] | ✓ | Embedding | Add | |
| Complex [525] | ✓ | Embedding | Multiply | |
| NoPE [74, 241] | ✗ | NA | NA | |
| Relative | Relative Position [453] | ✓ | Embedding | Add |
| T5 [425] | ✓ | Bias | Add | |
| Alibi [410] | ✗ | Bias | Add | |
| Kerple [75] | ✓ | Bias | Add | |
| Sandwich [76] | ✗ | Embedding | Add | |
| FIRE [287] | ✓ | Bias | Add | |
| RoPE [476] | ✗ | Embedding | Multiply | |
| XPOS [487] | ✗ | Embedding | Multiply | |
| HoPE [67] | ✗ | Embedding | Multiply | |
| BAM [28] | ✗ | Bias | Add | |
| Content-Aware | CoPE [154] | ✓ | Embedding | Add |
| DAPE [680, 681] | ✓ | Bias | Add |
- •
T5-Style [425]. T5 initially maps the relative distance between tokens at positions and to a scalar bias value , where represents a lookup table. Subsequently, the relative bias (learned during the training process) is incorporated into the dot product of the query and key within the self-attention mechanism. The lookup table assigns the same parameter to distances exceeding a certain threshold, thereby facilitating generalization to unobserved distances. Base on T5’s position embedding, FIRE [287] proposes to map the positional representations as a learnable function. To solve the length generalization issue when the test length varies, FIRE proposes progressive interpolation by normalizing the distance by query position index. In this way, FIRE can map any test length into the training range.
- •
ALiBi [410] and its Variants. ALiBi, which is adopted in BLOOM [440] and Baichuan [603], is similar to T5’s position encoding. However, it differs in that it subtracts a scalar bias from the attention score. This bias increases linearly in proportion to the distance between the query and key tokens. As a result, this actually generates a preference for tokens that are closer in position, which is known as a recency bias. Alibi can be formulated as the following:
(1) where is a head-specific scalar hyper-parameter. and mean the position indices of and . and represent the projection layer in the attention. Building on top of ALiBi, Kerple [75] introduces two trainable parameters for better length extrapolation, while Sandwich [76] simplifies the form of sinusoidal position embedding by only considering the cross term of position embeddings to alleviate the overfitting issue of sinusoidal position embedding. BAM [28] frames attention as a Bayesian mechanism and adopts a Generalized Gaussian Distribution as prior, achieving improved length extrapolation capability.
- •
Rotary Position Embedding (RoPE) [476] and its variants. RoPE rotates the query and key representations by an angle that is proportional to their absolute positions prior to dot product attention. Owing to this rotation, the attention dot product will rely solely on the relative distance between tokens, thereby effectively transforming it into a relative positional encoding. To elucidate, given a hidden vector , where is the hidden dimension, and a position index , RoPE operates as follows:
(2) where . Given a query at position and a key at position , attention score is defined as:
(3) where g(·) is an abstract mapping function exclusively dependent on and . Benefiting from this good nature, RoPE becomes the most pervasive position embedding strategy in the era of LLMs, including LLaMA [515], Qwen [604], etc. Sun et al. [487] ascribes that the weak extrapolation ability of RoPE is related to the significant oscillation in their attention expectations. To address this problem, they propose XPOS that incorporates a balancing term to penalize the oscillation of unstable dimensions while maintaining the distribution of stable dimensions. Also building upon RoPE’s foundation, HoPE [67] enhances length extrapolation by replacing specific components with position-independent ones while retaining only high-frequency signals.
Content-Aware Position Embedding
More recently, there has been a growing interest in Content-Aware Position Embedding [154, 680], which argues that position measurement should take into account more semantically meaningful units such as words or sentences, as illustrated below:
- •
CoPE [154]. CoPE considers the joint modeling of content and position information by leveraging the content of the tokens and their positions in the sequence. Specifically, CoPE first calculates context-dependent gate values, and then employs these values to determine token positions through a cumulative summation process. In this way, positions embeddings are equipped with contextualized information.
- •
DAPE [680, 681]. It proposes to model the positional information dynamically with the attention. Specifically, DAPE determines the position bias by not only the position indices but also the semantics information. In this way, DAPE overcomes the inflexibility and achieves relatively optimal performance for each individual instance by dynamically adjusting on each specific input data.
| Intuition | Method | Training-free |
| Position Reorganization | SelfExtend [229] | ✓ |
| DCA [9] | ✓ | |
| ReRoPE [478] | ✓ | |
| String [10] | ✓ | |
| Position Interpolation | PI [60] | ✓ |
| NTK [402] | ✓ | |
| ABF [592] | ✓ | |
| YaRN [402] | ✓ | |
| Truncated Basis [391] | ✓ | |
| CLEX [49] | ✗ | |
| Resonance RoPE [543] | ✗ | |
| LongRoPE [103] | ✗ | |
| MsPoE [668] | ✓ | |
| Hierarchical Position | BiPE [179] | ✗ |
| HiRoPE [650] | ✓ | |
| Position Simulation | RandomPE [434] | ✗ |
| PoSE [698] | ✗ | |
| SkipAlign [572] | ✗ | |
| Cream [571] | ✗ | |
| LongRecipe [195] | ✗ |
3.1.2 Extrapolation Methods of Position Embeddings
For a language model with an original context window size of , when processing a target sequence of length (with scaling factor ) that exceeds this range, the first challenge is the position encoding OOD problem, as position encodings cannot cover a larger range. As mentioned in LM-Infinite [169], position encoding OOD is a significant factor hindering length extrapolation. From the perspective of avoiding out-of-distribution positions, position encoding-based length extrapolation strategies can be mainly divided into two categories: (1) Mapping the target sequence to the position range supported by the model, and (2) Enabling the model to support position ranges larger than the context window size. Notably, most methods in the first category can perform well without additional tuning, while designs in the second category often rely on training to be effective.
Mapping target sequences to the model’s supported position range can be further divided into two lines:
- •
Position Reorganization: This approach reorganizes, particularly reuses, position indices that appeared during training to handle inputs exceeding training length. This idea of reorganizing position indices was evident in the T5 model [425], which supports 512 tokens input but only contains 32 types of relative positions. For mainstream large language models using RoPE encoding, similar approaches can be applied. In SelfExtend [689], for each token, normal relative positions are maintained for the nearest tokens, while distant tokens are grouped. DCA [9] follows a similar approach. ReRoPE [478] makes relative positions beyond window increase at smaller intervals. Furthermore, String [10] discovered that even within the model’s supported position range, it performs better at shorter relative positions, thus utilizing well-trained positions more extensively.
- •
Position Interpolation: Unlike reusing existing positions, position interpolation chooses to monotonically reduce all input token position indices to not exceed the maximum training value. The first proposed interpolation strategy was linear interpolation, which directly scales down each token’s position index to [60]. Under RoPE position encoding, this is equivalent to uniformly reducing the angle . According to neural tangent kernel theory [210], this approach might prevent the model from learning high-frequency features. To address this, NTK interpolation [402], also known as ABF [592], reduces the scaling ratio for high-frequency parts while increasing it for low-frequency parts. In practice, NTK interpolation directly adjusts the original to , where is typically chosen to be slightly larger than . YaRN [402] discovered that using a ramp function to perform NTK interpolation at different ratios across dimensions could achieve better results. Building on YaRN, Resonance RoPE [543] further optimized RoPE’s features using integer wavelengths. LongRoPE [103] directly uses evolution search to find optimal frequency scaling parameters for each dimension. Some work has explored assigning different scaling factors to different attention heads [668] or layers [66], or dynamically deciding the optimal scaling factor via extra modules [699], to improve model performance on long context tasks. In addition to the extrapolation method based on RoPE, some researchers have also applied linear and NTK interpolation techniques to ALiBi [6, 383].
On the other hand, enabling models to support position ranges larger than the context window size is mainly achieved through two approaches:
- •
Hierarchical Position Embedding: Similar to a number system, this approach greatly increases the representable range by introducing hierarchy in position encoding. BiPE [179] introduces a two-layer position encoding system responsible for modeling positions within and between segments. HiRoPE [650] focuses on code scenarios, utilizing code’s natural hierarchy by using RoPE’s lower dimensions and higher dimensions to handle token-level and function-level distances respectively.
- •
Position Simulation: Interestingly, a line of research explores the use of short training data to simulate long training data, effectively decoupling training length from inference length. RandPos [434] randomly samples a set of positions from a longer position sequence, sorts them in ascending order, and uses them as position indices for shorter input data. Encoders trained using this approach demonstrated superior length extrapolation capabilities. For LLMs, Zhu et al. [698] proposed PoSE, which divides the original context window into several blocks, ensuring continuous position indices within blocks while allowing jumps between blocks, thereby covering longer relative positions with a shorter context window. CREAM [571], LongRecipe [195], and SkipAlign [572] have made further improvements upon PoSE. Specifically, CREAM employs strategies such as Gaussian Sampling to optimize text block partitioning, enhancing both continuity and relativity of position indices. LongRecipe similarly optimizes PoSE’s text block partitioning and introduces "Impactful Token Analysis" to select text content for padding within each block. SkipAlign determines block sizes and position index skip rates based on specific instruction-tuning requirements, achieving performance comparable to GPT-3.5-Turbo-16k on LongBench.
3.2 Attention
3.2.1 Transformer-Based Architecture
The predominant Large Language Models are based on the Transformer architecture [518]. Specifically, this architecture consists of multiple stacked Transformer layers, where each layer is composed of Multi-Head Self-Attention (MHSA), Feed-Forward Networks (FFNs), and Layer Normalization (LN). Each layer takes the output from the preceding layer as its input and passes its own output to the subsequent layer. Classic configurations encompass encoder-only architectures such as BERT [102] and GLM [113] for encoding models, decoder-only structures like GPT [37] and LLaMA [515] for generative models, and encoder-decoder frameworks like T5 in sequence-to-sequence modeling. The core Self-attention [518] mechanism is as follows:
| (4) |
where , , . the time complexity of is .
Due to the inherent quadratic computational complexity associated with the MHSA component within the Transformer architecture, most Transformer-based models encounter limitations concerning length and efficiency, posing challenges for effective training and inference on long texts. Consequently, various approaches have emerged to enhance the Transformer structure, primarily focusing on improvements within the Attention mechanism and modifications to the overall architecture. The following sections of this chapter will delineate these methods including sparse attention, hierarchical attention, recurrent transformer, and efficiency-driven modifications.
Sparse Attention
To address the quadratic complexity of attention in Transformer-based models and the challenge posed by the extremely large KV cache in long context scenarios, numerous prior works have explored sparse attention mechanisms, which reduce both computational and memory overhead, enabling faster processing and improved scalability for real-world applications. Sparse attention can be broadly categorized into training-based and training-free approaches, depending on whether it is applied during training or inference.
For training-based methods, the sparsity is mainly reflected from two perspectives, head dimension (e.g. group query attention) and context window dimension (e.g. sliding window attention). The most common function in head dimension sparse attention is group query attention(GQA) [5]. Grouped-query attention organizes query heads into distinct groups, where each group utilizes a shared key head and value head. When , GQA has only one group, one key and one value head, which is comparable to Multi-Query Attention (MQA). When (the number of groups is equal to the number of heads ), the MQA is analogous to standard Multi-Head Attention (MHA). Weighted Grouped Query Attention [79] adds novel learnable parameters for every key and value head in the attention blocks to achieve aggregation among these key and value heads. Mixture of Attention (MoA) [127] automatically tailors distinct sparse attention configurations for different heads and layers, where the MoA constructs and navigates a search space of various attention patterns and their scaling rules relative to input sequence lengths.
As the context length grows, sparsity in the context window dimension can effectively reduce the extra computation caused by increasing the length and capturing valid information [343, 542, 272]. Beltagy et al. [25] introduce the Longformer with an attention mechanism that scales linearly with sequence length to process documents of thousands of tokens. Zebra [468] groups local-global attention layers into blocks during the training and inference phases. Xiao et al. [589] have found that keeping the KV of initial tokens will largely recover the performance of window attention, where these initial tokens lack meaningful semantics, but attract substantial attention scores. Gao et al. [137] adopts a fully learning-based approach to adaptively identify attention sparsity in LLMs and leverage the learned sparsity for efficient inference. Recently, following the principles of Mixture of Experts (MoE), the MoBA [338] has been proposed, where the trainable block sparse attention and parameter-less gating mechanism are introduced.
However, most previous methods require training a model from scratch, limiting their usability as direct plugins for ready-to-use large language models. Some training-free sparse attention approaches are as follows:
- •
Static Strategy. A variety of methods have been proposed to enhance efficiency while maintaining performance during inference. Window attention [25, 78, 215] maintains a fixed-size sliding window on the KV states of most recent tokens, ensuring efficiency but suffering from performance degradation once the initial tokens are evicted. StreamingLLM [589] mitigates this issue by identifying “attention sinks" where the initial tokens often receive disproportionately high attention scores, allowing LLMs trained on finite attention windows to handle infinite-length sequences without fine-tuning. LM-Infinite [169] designs a -shaped attention mask and a ceiling on attention distances and enables LLMs to generalize to extreme sequence lengths without any parameter updates.
- •
Dynamic Strategy. Unlike previous methods that rely on static, fixed-window strategies, later methods employ dynamic strategy to select and retain the most important tokens. H2O [669] retains only the “Heavy Hitters" tokens in the KV cache using accumulated attention scores. Similarly, Scissorhands [333] prioritizes important tokens based on the “Persistence of Importance Hypothesis". CORM [90] is a KV cache eviction policy to dynamically retains important key-value pairs for inference without model fine-tuning. SnapKV [296] improves efficiency by utilizing attention scores to identify and cluster significant tokens. FastGen [140] recognizes several fundamental attention patterns and introduces an adaptive KV cache eviction policy. MInference [218] accelerates the prefilling stage using dynamic sparse attention with spatial aggregation patterns, allowing seamless integration into existing LLMs. Quest [495] is a query-aware KV cache selection algorithm which tracks the minimum and maximum keys and values in KV cache pages.
- •
Layer-Level Optimization. Most of the aforementioned methods adopt the same strategy across layers to reduce the KV cache, ignoring the varying importance of information processing at different layers. PyramidKV [40] and PyramidInfer [607] have discovered that LLMs aggregate information through a pyramid-shaped information funnel and dynamically adjust the KV cache size across different layers, allocating more KV cache to lower layers and less to higher layers. LazyLLM [126] apply layer-wise token pruning in each generation step. DynamicKV [693] dynamically optimizes token retention by adjusting the number of tokens retained at each layer to better suit specific tasks. LightTransfer [664] minimizes inter-layer KV cache redundancies by selectively removing cache from identified lazy layers. TidalDecode [612] accelerates LLM decoding through position persistent sparse attention.
- •
Head-Level Optimization. Previous works have not focused on the differences in attention patterns across different heads. RazorAttention [494] and DuoAttention [587] significantly improves the long context efficiency by dividing the attention heads into Retrieval Heads (which require full KV cache) and Non-retrieval Heads (which only need a fixed-size KV cache), which substantially reduces memory consumption and maintains accuracy while increasing both decoding and prefilling speeds. AdaKV [125] adaptively allocates the KV cache budget across attention heads to optimize cache eviction strategies. HeadKV [129] incorporates Retrieval Heads identification to introduce a new adaptive budget allocation strategy, which globally allocates budgets individually for each attention head. LONGHEADS [342] splits the sequence context into chunks and each attention head focus on parts of chunks. When generating a particular token, LONGHEADS selects the blocks that are most relevant to the current token based on its query vector and chunk representation.
- •
Other Methods. Despite these advancements, many approaches suffer from permanent information loss due to aggressive token pruning. Loki [465] is a PCA-based sparse attention mechanism by leveraging the low-dimensionality of key vectors in the attention block, yielding inference speedup and maintaining efficacy.
Hierarchical Attention
Various hierarchical mechanisms have been proposed to introduce a structured hierarchy into self-attention, which leverages high-level global information and low-level local attention for multi-scaled contextual receptive fields. HAN [618] pioneers the use of a two-level attention mechanism. It first applies self-attention to word features to obtain a sentence representation, then employs self-attention on sentence-level features to generate document-level features. Hi-Transformer [565] models documents in a hierarchical way, which learns both the sentence representation and the document representation. ERNIE-SPARSE[330] leverages a Hierarchical Sparse Transformer to sequentially unify local and global information. HOMER [470] processes extensive text by first dividing the input into smaller chunks and subsequently merging them in stages as they pass through the transformer’s layers.
Recurrent Transformer
Apart from the relatively high computational complexity, the self-attention mechanism integrates global and local information in the encoding of each token, rendering it less suitable for tasks such as long-text understanding. Based on this insight, some works strive to combine Transformer architecture with recurrent structures, enhancing the capture of long-term dependencies and improving the ability to understand long contexts [577, 629, 449].
In the earlier attempts, Transformer-XL [91] extends the context window beyond fixed lengths by employing segment-level recurrence and relative positional encoding. Memformer [570] utilizes an external dynamic memory to encode and retrieve past information, attaining linear time complexity and constant memory space complexity when processing long sequences. Compressive Transformer [423] maps past hidden activations (memories) to a smaller set of compressed representations (compressed memories) for long-range sequence learning. Block-Recurrent Transformer [204] applies a transformer layer in a recurrent manner along a sequence. During training, the recurrent cell operates on blocks of tokens rather than individual tokens and exploits parallel computation within a block to efficiently utilize accelerator hardware, exhibiting linear complexity with respect to the sequence length. Unlike existing recurrent-based models that use special global tokens to store representations and place them at the beginning of the input sequence, RMT[38] incorporates a memory mechanism through special memory tokens added to the input sequence, enabling the model to store and process both local and global information efficiently. SRformer[335] divides the input sequence into segments to compute segmented attention and adds recurrent attention to aggregate global information over segments. Infinite Attention[375] incorporates a compressive memory into the attention mechanism and incorporates both masked local attention and long-term linear attention mechanisms within a single Transformer block. ARMT[431] is based on transformer self-attention for local context and segment-level recurrence for storing task-specific information distributed over a long context.
Efficiency-Driven Modifications
By caching the previously computed key/value vectors, the decoders can reuse them for the current generation step. The key-value (KV) cache avoids encoding the history again for each token. Although this can significantly improve the inference efficiency, it imposes expensive memory overhead as the sequence length grows. To alleviate the KV cache memory consumption, some efficiency-driven modifications have been proposed, including reducing KV-heads, such as Grouped-Query Attention (GQA), Multi-Query Attention (MQA) and Multi-head Latent Attention (MLA) mechanism [310]. Note that the GQA and MQA has been discussed in Sparse Attention. For MLA, instead of directly reducing KV-heads, which is primarily considered a trade-off between performance and memory consumption, the MLA compresses the key and value into a latent vector to reduce the caching consumption and decompresses the key and value head for each query head when generating.
3.2.2 Linear-Complexity Architecture
Linear complexity methods fall into two broad categories, including Mamba methods based on SSM architecture, and improvement methods based on Linear Attention. We also briefly discuss Test-Time Training at the end.
First, we focus on the State Space Model (SSM) [235] and its variations. With the context length increasing rapidly, higher training and inference costs become a bottleneck. To speed up reasoning and capture long-term dependencies, the SSM models are gradually coming into people’s view. SSM derived from modern control system theory, is a mathematical model that describes the behavior of a dynamic system using a set of first-order differential equations (continuous-time systems) or difference equations (discrete-time systems) to represent the evolution of the internal state of the system, while using another set of equations to describe the relationship between the state and the output of the system [521].
SSM
SSM is proposed based on classical Kalman filtering Kim and Bang [244], Gu et al. [156]. It describes the state representation of a sequence at each time and predicts its next state based on the input. The SSM consists of two main parts - state and observation. The state equation expresses the trend of the future state, while the observation equation predicts the current output based on the current state and input.
| (5) | |||
represents the state vector, represents the input signal and represents the output signal. , , and is the state matrix, input matrix, output matrix, and feed-forward matrix, which are parameters learned by gradient descent. because the term can be viewed as a skip connection and is easy to compute. We can hypothesis is a zero matrix. The rewritten formula is as follows:
| (6) | ||||
The classical SSM model is used to process continuous signals, while discrete inputs are common in the field of NLP [160]. Linear State Space Layer (LSSL) introduces continuous SSM to obtain two discretized representations including the Recurrent Representation and the Convolutional Representation. Mamba [157] leveraged the zero-order hold (ZOH) to discretize SSM. The Recurrent Representation of discretization is as follows:
| (7) | ||||
, , is step size that represents the resolution of the input. if we use instead of and instead of , We can see that it has a similar formula as recurrent neural networks (RNNs),
| (8) |
Similar to RNN, the recurrent representation can be performed for efficient inference, but it cannot be used for parallel training. Therefore, LSSL proposes the convolutional representation for training.
Recently, the Structured State Space Sequence model (S4) [159] is proposed based on SSM to modeling the long sequences, which can be computed more efficiently than previous methods while retaining their theoretical advantages.
Mamba and its Variants
Prior work found that the SSM shows poor performance as it is a Linear Time-Invariant (LTI) system that is deeply connected to recurrence and convolutions. In other words, (, , , , , ) in Equation 7 are fixed for all time-steps. However, LTI has fundamental limitations in modeling certain types of data. It loses the ability to efficiently select data in an input-dependent manner. Gu and Dao [158] propose Mamba to design a simple selection mechanism by parameterizing the SSM parameters. The details are as follows:
| (9) | ||||
where , and are the Linear layer and . Meanwhile, Mamba introduces the hardware-aware algorithm that computes the model recurrently with a parallel scan instead of convolution. Notably, it avoids IO access between different levels of the GPU memory hierarchy without modeling the expanded state. Finally, Mamba has 5x higher throughput than the Transformer and has linear scaling over sequence length, which is friendly with long context capabilities.
Many methods have been proposed to optimize Mamba [65, 634, 471]. For example, ReMamba [634] employs selective compression and adaptation methods to compress and retain essential information, minimizing data degradation and reducing state space updates to alleviate information loss. Similar to ReMamba, TAIPAN [380] combines Mamba-2 with selective attention layers for enhancing performance and ensuring computational efficiency, where the selective attention layer is used to filter out irrelevant information. DeciMamba [26] introduces a context-extension technique tailored for Mamba, which leverages a concealed filtering mechanism, and allows the trained model to effectively extrapolate without further training.
Linear Attention
Transformer has a significant advantage in long context tasks, and the current model has been extended to 128k or higher. But the time complexity and space complexity of the Transformer are both . As a result, when is significantly large, the computational burden of the Transformer model becomes challenging. Recently, considerable efforts have been made to lessen the computational demands of self-attention in Transformer [455, 417, 170, 14, 593]. In this section, we will discuss mainstream works on linear attention as follows:
First, Katharopoulos et al. [240] propose the linear transformer model by using a kernel-based formulation [421] of self-attention and the associative property of matrix products to calculate the self-attention weights, which greatly reduces memory usage and scales linearly to the context length. Choromanski et al. [82] introduce the Performers, which utilize the fast attention via positive orthogonal random features and implement the kernelizable attention mechanisms beyond softmax.
RetNet [486] includes three computation paradigms, i.e., parallel, recurrent, and chunk-wise recurrent, and the chunk-wise recurrent paradigm achieves linear complexity for sequence modeling. which achieves training parallelism, good performance, and low inference cost simultaneously. Munkhdalai et al. [376] propose the Infini-attention and include a compressive memory into the vanilla attention mechanism, which uses masked local attention and long-term linear attention modules in the Transformer block. There are similar methods, such as Lightning Attention-2 [415] employs a tiling strategy to distinctly manage intra-block and inter-block elements during linear attention computation, where the MiniMax-01 [367] model uses this attention module. It adopts standard attention mechanisms for intra-block processing while implementing linear attention kernel techniques for inter-block operations. Transformer-VQ [308] is a transformer decoder that performs dense self-attention computations in linear time relative to sequence length. This efficiency is achieved by integrating vector-quantized keys, localized positional biases, and a compressive cache designed for efficient attention processing.
RWKV Family
Unlike previous attempts with Recurrent Transformers, RWKV [400] introduces an enhanced linear attention mechanism, merging the computational efficiency of RNNs with the parallelism and expressive power of Transformers. This enables highly parallelized training and efficient inference, with its linear time complexity making it particularly suitable for long-sequence tasks. The acronym "RWKV" represents four key elements:
- •
R (Receptance): A gating vector that integrates historical information.
- •
W (Weight): A trainable decay factor applied across positions.
- •
K (Key): Functions similarly to the key vector in standard attention mechanisms.
- •
V (Value): Operates like the value vector in traditional attention systems.
RWKV-4 is the first publicly released version, following experimental iterations (RWKV-1, RWKV-2, and RWKV-3). The RWKV-4 model consists of multiple residual blocks, each featuring time-mixing and channel-mixing components. Building on RWKV-4, RWKV-5 (Eagle) and RWKV-6 (Finch) [401] introduce further innovations. Eagle enhances expressive power by replacing vector-valued states with multi-head matrix-valued states and refining the learning decay strategy. It also reconfigures receptive states and adds gating mechanisms for improved performance. RWKV-6 (Finch) further boosts expressiveness and adaptability by integrating data-driven functions, such as parameterized linear interpolation, into the time-mixing and token-shifting modules. It also introduces low-rank adaptation functions, making weight matrices trainable and enabling context-sensitive optimization of decay vectors. These advancements maintain RNN-like inference efficiency while significantly enhancing the model’s capabilities.
Test-Time Training
Another emerging approach to modeling long context is Test-Time Training (TTT) [485], which dynamically stores context information in the model’s adaptable weights (referred to as fast weights [442]). The core idea is to frame the update of these adaptable weights as online gradient descent, as exemplified by systems like Titans [24], Atlas [23], and TTT Done Right [659]. When the update logic for adaptable weights is linear, TTT becomes equivalent to linear attention. Therefore, TTT can be viewed as a more expressive framework than linear attention, capable of capturing more complex dependencies through its nonlinear update mechanisms.
3.2.3 Hybrid Architecture
Waleffe et al. [523] and Park et al. [397] demonstrate that although the Mamba and Mamba-2 models perform well in language modeling, they fall short compared to Transformer models in long context tasks, such as in-context learning and long context retrieval. Chen et al. [64] and Waleffe et al. [523] find that adding a few standard Transformer layers back into the architecture enables the model to overcome these issues. The essence of hybrid architecture involves combining linear complexity attention with standard attention modules. This integration has developed into three main approaches:
- •
First, a layer-wise hybrid architecture where full attention and linear attention are mixed at the layer level. It’s worth noting that models incorporating Sliding Window Attention (SWA) also fall into this category, even though early researchers might not have classified them as hybrid architectures.
- •
Second, a prefilling-decoding hybrid architecture where different architectures are used for prefilling and decoding stages. This approach exclusively uses linear complexity attention layers during the prefilling phase, while the decoding stage implements a hybrid architecture that incorporates full attention mechanisms. The pioneering work in this direction is YOCO [488].
- •
Third, a head-wise hybrid architecture that leverages the multi-head principle of attention mechanisms. This method assigns specific attention heads to perform full attention while designating other heads to execute linear attention operations. Hymba [106] stands as the seminal work in this approach.
The following sections will explore these three approaches in detail.
Layer-Wise Hybrid Architecture
The evolution of hybrid architecture in large language models represents a significant advancement in balancing performance and efficiency, particularly for handling long contexts. The layer-wise approach, combining linear complexity attention with standard attention modules, has emerged as the predominant strategy. Jamba [304] pioneered this hybrid architecture at scale, effectively combining Transformer and Mamba layers with a MoE module, discovering that a 7:1 ratio (Mamba to Transformer layers) provided optimal balance. Jamba 1.5 [505] scaled this approach beyond 100B parameters, maintaining the same 7:1 ratio while requiring only 9GB for its KV cache with a 256K context length—compared to 80-88GB for similarly sized transformer models. Google’s RecurrentGemma [33] employed the Griffin architecture combining linear recurrences with local attention, using a mixture of mechanisms within each layer rather than interleaving different layer types. Meanwhile, Microsoft’s Samba [429] combined Mamba with SWA rather than full attention, maintaining linear complexity while providing the benefits of attention for local contexts. Comprehensive experimentation demonstrated that this hybrid approach outperformed both pure Mamba and pure attention models of similar size across standard benchmarks. Zyphra’s Zamba [150] innovated by incorporating a shared attention mechanism—utilizing a global shared attention block that appeared every few Mamba blocks but shared parameters across all instances, reducing memory requirements while maintaining strong performance. Zamba2 [149] expanded on these innovations in multiple size levels, switching from Mamba to Mamba-2 and using two alternating shared attention blocks with non-shared low-rank adapters. MiniMax-01 [367] became the first open-source hybrid model to achieve true state-of-the-art performance across comprehensive benchmarks, using a configuration where one transformer block with softmax attention followed every seven Transformer blocks with lightning attention [416]. It matched the performance of leading commercial models while supporting context lengths up to 4 million tokens.
The sliding window approach represents another variant of hybrid attention. Google’s Gemma [504] employed a more balanced 1:1 ratio of full attention to SWA layers, emphasizing balanced performance across tasks rather than maximizing context length. Cohere’s Command R-7B [87] implemented a hybrid approach with SWA, enabling efficient processing of longer contexts while maintaining strong benchmark performance. Research from Character.ai [46] found that approximately 6:1 (linear complexity to full attention) yielded optimal results—aligning with findings from other hybrid models. This convergence on ratios of approximately 6:1 or 7:1 across multiple independent research efforts indicates a sweet spot in the design space, suggesting that hybrid architectures represent not just a compromise but potentially the optimal approach for next-generation language models efficiently handling diverse contexts.
The approaches discussed above primarily rely on standard full attention to capture global information. Recently, there have also been attempts [123] to compress global information into fixed-size representations, which preserve competitive performance while significantly lowering the compute and memory costs of the global part.
Prefilling-Decoding Hybrid Architecture
The prefilling-decoding hybrid approach optimizes language model operation by applying different attention mechanisms based on the operational phase—using linear complexity attention during prefilling and implementing hybrid architectures during decoding. YOCO [488] pioneered this paradigm with a decoder-decoder structure that dramatically reduces memory requirements. The self-decoder processes input context using linear-complexity attention and produces a single global key-value cache, which is then reused by all layers of the cross-decoder. This design reduces KV cache memory requirements by approximately a factor equal to the number of model layers, which enables early exit during prefilling and maintains performance comparable to traditional Transformers. GoldFinch [153] represents another innovation in this category, stacking a GOLD transformer on top of an enhanced Finch (RWKV-6) architecture. Its key contribution is the “TokenCat” mechanism, which generates a highly compressed key cache in linear time and space. This approach yields remarkable efficiency gains, with cache size savings 756-2550 times smaller than traditional transformer caches. Both approaches demonstrate that prefilling-decoding hybridization offers a powerful alternative to pure architectures, enabling dramatic efficiency improvements for long context inference without sacrificing model quality.
Head-Wise Hybrid Architecture
The head-wise hybridization approach combines linear and attention-based mechanisms in parallel within the same layer, allowing different attention heads to process identical inputs using different mechanisms simultaneously. Hymba [106] pioneered this approach with a hybrid-head architecture that integrates transformer attention mechanisms with state space models within each layer. Attention heads provide high-resolution recall capabilities while SSM heads enable efficient context summarization. This design can be interpreted as mimicking human cognition: attention heads function like snapshot memories storing detailed recollections, while SSM heads act as memories that retain core information while forgetting details. Samba [429] combined the Mamba block and sliding window attention block together with an MLP layer. It combines local and global attention mechanisms. Local attention maintains sensitivity to near-neighbor information, while global attention allows the model to capture dependencies over long distances.
4 Workflow Design
Recent advancements in long context modeling often focus on modifying model parameters or altering the architecture to process long contexts, typically involving fine-tuning large language models or implementing complex internal mechanisms. In contrast, the methods presented in this section aim to enhance the long context processing capabilities of LLMs without altering their parameters, instead leveraging external components to augment the model’s ability to handle long contexts. As shown in Figure 6, the strategies discussed in this chapter are as follows: (1)Prompt Compression (Sec. 4.1) reduces the size of the input context while retaining essential information. (2)Memory-Based Methods (Sec. 4.2) utilize an external memory module to store long contexts for efficient retrieval. (3)RAG-Based Methods (Sec. 4.3) extract or recall specific information from long contexts to reduce the context. (4)Agent-Based Methods (Sec. 4.4) leverage the LLM agent’s memory, planning, and reflection capabilities to handle long contexts effectively.
4.1 Prompt Compression
As real-world tasks such as Chain-of-Thought (CoT), In-Context Learning (ICL) and Retrieval-Augmented Generation (RAG) become more complex, prompts for LLMs often grow longer to include detailed requirements, contextual information and examples [300]. Nevertheless, lengthy prompts reduce inference speed, increase memory costs or API bills and degrade user experience. Prompt compression seeks to enhance LLM efficiency by reducing input complexity of LLMs. These techniques typically require an additional module to compress prompts while make minimal or no changes to the original LLMs’ parameters, allowing for plug-and-play integration. Based on the form of the compressed prompt, prompt compression methods can be divided into two types: 1) Hard Prompt Compression maintains the use of natural language words or sub-words (Sec. 4.1.1); 2) Soft Prompt Compression converts natural language into embedding representations (Sec. 4.1.2).
4.1.1 Hard Prompt Compression
Hard prompts are natural language prompts composed of tokens from the LLM’s vocabulary, representing specific words or subwords. Hard prompt compression aims to streamline natural language prompts by reducing their length or complexity, while still maintaining their effectiveness in eliciting the desired response from the model. This process typically includes two approaches: (1) selecting relevant tokens of the prompt or (2) rewriting it for brevity and clarity.
Selecting
SelectiveContext [293] enhances LLM inference efficiency by calculating token self-information with a small language model, grouping tokens into lexical units, and removing redundant content. AdaComp [655] adaptively selects relevant documents by considering both query complexity and retrieval quality. CPC [309] introduces a sentence-level compression technique leveraging a context-aware sentence encoder to rank sentences by their the embedding similarity to the query and removing less relevant sentences. TCRA-LLM [318] proposes a token compression scheme with two complementary methods: summarization compression which uses a T5-based model to reduce token size, and semantic compression which eliminates words with lower semantic impact.
Besides, reinforcement learning (RL) has been applied to improve the efficiency and effectiveness of prompt compression methods. DynaICL [689] enhances in-context learning efficiency by using reinforcement learning to fine-tune a meta-controller that dynamically adjusts the number of few-shot examples based on input query difficulty, balancing efficiency and performance. PCRL [234] applies a discrete prompt compression method with reinforcement learning. TACO-RL [446] leverages task-specific reward signals to fine-tune a encoder-based compression model using on-policy RL, enabling effective compression while maintaining performance.
In addition, the LLMLingua series aims to build a specialized language for LLMs through prompt compression, which accelerate model inference, reduce costs and improve downstream performance. LLMLingua [219] leverages a smaller language model to calculate perplexity (PPL) and remove redundant tokens, featuring a budget controller, iterative prompt algorithm, and alignment techniques to achieve up to 20x prompt compression while preserving semantic integrity. LongLLMLingua [220] proposes a question-aware coarse-to-fine compression method, a document reordering mechanism, dynamic compression ratios and a subsequence recovery strategy to improve LLMs’ ability to perceive and prioritize key information. LLMLingua-2 [392] introduces a task-agnostic prompt compression method, trained via data distillation from GPT-4 with a BERT-level encoder, achieving 3x-6x speed improvements over LLMLingua while preserving crucial information.
Rewriting
An alternative approach involves rewriting prompts instead of selecting them. Nano-Capsulator [84] encapsulate lengthy prompts into shorter ones while adhering to specific generation length constraints, maintaining performance through an explicit semantic-preserving objective with reward scoring. CompAct [627] captures pivotal information from extensive documents by dynamically retaining essential contexts and incorporating information. FAVICOMP [233] is a decoding-time evidence compression approach that produces a refined evidence set more familiar to the target model, enhancing RAG performance while seamlessly integrating parametric knowledge.
4.1.2 Soft Prompt Compression
Soft prompts [270] present an innovative paradigm by eliminating the reliance on discrete tokens. Instead, they directly learn a series of continuous embeddings via backpropagation, which can be fed into the transformer without requiring a mapping to any actual language tokens. Such soft prompts can serve as an efficient alternative to conventional plain-text context, significantly reducing computational overhead during inference. Depending on whether the origin LLMs’ parameters are updated, soft prompt compression can be broadly categorized into two types: 1) LLM-fixed methods and 2) Gist token-based methods.
LLM-fixed
LLM-fixed methods focus on compressing prompts without updating the original LLMs’ parameters, offering an efficient solution for managing input context length. Instead, they involve training additional modules that transform discrete tokens into continuous embeddings, facilitating efficient prompt compression. Contrastive conditioning [562] focuses on learning compact soft prompts to simulate the original natural language prompt by minimizing the Kullback-Leibler (KL) divergence. However, contrastive conditioning incurs substantial computational overhead, as it requires retraining from scratch for each new incoming prompt, making it impractical for broad application. ICAE [141] generates compact and informative memory slots to represent the original context, enabling LLM to encode more information within the same context length. This improves the model’s capability to handle long contexts and reduces computation and memory overheads during inference. 500xCompressor [301] builds upon ICAE but utilizes KV values for compressed tokens instead of embeddings,achieving remarkable compression ratios. xRAG [72] uses a frozen embedding model as the encoder and a trainable adapter between the encoder and decoder LLM. Through modality fusion, it integrates document embeddings into the LLM’s representation space, eliminating the need for textual representations and achieving high compression rates. UniICL [132] compresses demonstrations into compressed features, which are then converted into compressed virtual tokens via a learnable projection layer. These virtual tokens replace original demonstrations to shorten input length and help select potential demonstrations. The queries and virtual tokens are then fed into the frozen LLM for response generation.
In summary, LLM-fixed methods offer diverse strategies for prompt compression by optimizing input representations while preserving the frozen parameters of the original LLM. As an upper-bound reference, Kuratov et al. [255] demonstrate near-lossless compression by optimizing a small set of soft ‘memory’ vectors for a frozen LLM, clarifying the achievable limits of soft-prompt compression and pointing to directions for future encoders compression ratios. In general, these methods significantly enhance computational and memory efficiency, enabling more effective utilization of LLMs for a broad range of tasks.
Gist Token-based
Gist token-based methods aim to compress prompts by condensing the context into a small set of special tokens, referred to as “gist tokens" [372]. These tokens replace the original context, enabling efficient caching and reuse while reducing computational costs. However, such methods typically require modifying the parameters of the LLM. Gist [372] introduces a method to train models for prompt compression without additional cost over standard instruction finetuning, which inserts gist tokens after the prompt and modifies Transformer attention masks to prevent tokens after the gist tokens from attending to those before them, allowing the model to learn both prompt compression and instruction following simultaneously. AutoCompressors [73] process long documents by recursively generating gist tokens which are passed as soft prompts to all subsequent segments and result in more compact soft prompts. Activation Beacon [653] serves as a plug-in for Transformer-based LLMs that enables effective, efficient, and flexible compression of long contexts, featuring a progressive compression workflow that distills the context into a small set of activations.
In summary, gist token-based methods provide a powerful framework for reducing input length by converting context into compact, reusable tokens. These approaches offer significant efficiency gains, though they typically involve updating the LLM’s parameters to enable effective compression and integration.
4.2 Memory-Based Methods
Memory-based methods aim to utilize an external module (i.e., a memory module) to store long contexts. This approach effectively reduces the computational burden of directly relying on long contexts and mitigates potential information reduction associated with prompt compression. Generally, memory modules not only store essential historical information but also dynamically update, enabling efficient management of long context environments.
Memory augmentation has long been an actively explored topic. Even before the emergence of ChatGPT, numerous methods had been proposed and discussed. For example, MemPrompt [351] and [92] store user feedback on model responses in textual form, allowing for more personalized and accurate responses in subsequent interactions. Socratic Models [639] enables LLMs (Large Language Models), ALMs (Audio-Language Models), and VLMs (Vision-Language Models) to share a unified memory unit that stores logs of numerous observations captured in egocentric videos. By extracting key information from these logs, LLMs can operate effectively within long context environments. Token Turing Machine [437] utilizes an external memory unit composed of continuous vectors. Through cross-attention mechanisms, the model can read information from the external environment for processing or write processed information back into the memory module. This enables the model to achieve long-horizon robotic control.
Since the emergence of ChatGPT, LLMs have entered the era of agentic workflow. This paradigm involves equipping LLMs with abilities such as memorization, retrieval, planning, reflection, and tool-use, enabling them to adapt and respond contextually to complex, real-world tasks. In this section, we focus on how these LLMs or agents are augmented by memorization to understand long contexts or maintain consistency during long text generation. It is important to note that the discussions in §4.4 differ from this focus. Instead, the latter ones emphasize leveraging the agentic workflow specifically for enhancing LLMs’ long-text capabilities.
Memory-based methods for long-text language models can be categorized into three paradigms based on the form of memories: (1) continuous memory (latent vector representations), (2) language memory (textual content), and (3) parametric memory (model weights).
Language Memory.
Language Memory stores historical information as human-readable text fragments and typically reduces its length by retrieval and extraction. For example, Generative Agents [396] employs a “memory stream” with a triple scoring mechanism for item retrieval: (1) Recency, which prioritizes recent interactions using an exponential decay function; (2) Importance, where an LLM assigns a 1–10 score to each memory item based on its semantic significance; and (3) Relevance, computed as the embedding similarity between the current query and memory item. This mechanism effectively manages complex contexts with extremely long interaction records in a sandbox environment. Reflexion [460] stores textual feedback from self-reflection in a memory bank. When similar errors occur in subsequent generations, the model retrieves historical reflection records for real-time correction. MemoryBank [685] incorporates the Ebbinghaus Forgetting Curve to gradually weaken infrequently accessed memories while reinforcing frequently used ones, simulating the formation of long-term human memory. AdaPlanner [481] and Voyager [528] address long-horizon task planning through a skill library mechanism, where successful textual action plans from previous interactions are archived as reusable templates. These stored plans can be dynamically synthesized into complex strategies for novel tasks. This capability can be seen as simplifying past memories, which are in the form of long texts, into skill items, and retrieving and synthesizing them into manageable and effective contexts for subsequent text generation tasks based on on-the-fly needs. RecurrentGPT [690] enhances the coherence for long-text story generation by combining long-term memory retrieval of relevant paragraphs with short-term memory maintained through iterative plot summarization, mimicking human cognitive processes for sustained narrative consistency.
Continuous Memory.
Continuous Memory encodes long context information into latent vector representations, enabling efficient retrieval of historical context without explicitly storing raw text. For instance, LongMem [546] splits lengthy texts into fixed-length segments and caches their key-value pairs from intermediate Transformer layers in an external memory bank. During inference, it retrieves top-k relevant historical key-value pairs through query-key attention operation and integrates them with current hidden states via a joint attention mechanism. A newly designed cross-network residual connection between the LLM backbone and a trainable Transformer-based SideNet conducts such memory retrieval and fusion operations. MemoryLLM [551] embeds trainable memory tokens within each Transformer layer as a fixed-size memory pool, implementing a self-update mechanism that selectively overwrites less frequently accessed memory information with new information by replacing only a portion of memory units per update cycle.
Parametric Memory.
Parametric Memory internalizes long context information within the model’s weights. For example, DSI (Differentiable Search Index) [500] reformulates document retrieval as a generation task, training the model to directly output document IDs for queries, which allowing for the memorization of document-query mappings in models’ parameters. This approach eliminates the need for external storage and retrieval. Further, DSI++ [357] addresses the catastrophic forgetting issues of DSI in continual learning settings by introducing a sharpness-aware loss function: , where is the model parameters, and is a threshold. This loss encourages the model to converge to flatter minima, which are empirically shown to improve memory retention. Additionally, DSI++ employs a generative memory technique for memory replay, where a generator synthesizes pseudo-queries for previously indexed documents. These queries are mixed with new document data during continual training to mitigate forgetting and maintain updating over time. Generative Adapter [62] dynamically generates lightweight adapter modules () for previous context chunks () based on their hidden states () from the base LM, using an adapter generator () during test-time contextualization. Then, during inference, the generated adapter is integrated into the base LM for text generation. YORO [245] internalizes the database schema in input prompts into parametric knowledge of LMs via fine-tuning, significantly reduces the input token length by 66%-98% for Text-to-SQL task.
Pros & Cons.
Memory-based methods provide critical theoretical advantages for long-text language models by addressing the inherent limitation of Transformer-based LMs imposed by their finite context windows, which either truncate long sequences or incur quadratic computational costs from attention mechanisms. By externalizing the storage of long context, these methods bypass the architectural bottleneck of vanilla Transformer while retaining critical historical information. The computational completeness of memory augmentation is further underscored by Schuurmans [443], who prove that vanilla Transformer-based LMs are computationally limited, which can be overcome through read-write memory augmentation. Their experiments demonstrate that a 540B-parameter LLM (i.e., Flan-U-PaLM-540B) with associative read-write memory can simulate a universal Turing machines. Similar conclusions are drawn from [99]. Nevertheless, memory-based methods face practical challenges including retrieval latency, inconsistencies between memorized and live contexts, and the complexity of memory updating, among others.
4.3 RAG-Based Methods
In line with memory-based approaches for LLMs’ long-text capabilities, Retrieval Augmented Generation (RAG) aims to extract or recall specific information from the long texts to reduce the context. The retrieval sources can be training corpus, knowledge base, Internet, the provided long context, or the aforementioned external memories11 1 Typically, the retrieved memories are so-called long-term memories [690]..
Specifically, leveraging RAG techniques for enhancing long-text capabilities of LLMs involves a three-stage workflow: (1) chunking to partition long context into manageable units, (2) retrieval to extract the most relevant information, and (3) generation to synthesize retrieved knowledge with intrinsic model understanding into coherent and contextually rich outputs.
Chunking.
Vanilla chunking units involve fixed token length [274], sentences or paragraphs, delimiters such as ‘‘\n’’ or ‘‘\t’’, structural markers like Markdown headers or LaTeX sections, and semantically similar sentence neighbors22 2 https://github.com/FullStackRetrieval-com/RetrievalTutorials/blob/main/tutorials/LevelsOfTextSplitting/5_Levels_Of_Text_Splitting.ipynb. However, these approaches have several key issues as follows:
- 1.
Determining Optimal Chunk Size: Overly large chunks may exceed input limits of the embedding models, while excessively small chunks can fragment context, making retrieval more challenging and potentially degrading the quality of retrieved information.
- 2.
Maintaining Contextual Integrity: Ensuring that splitting does not disrupt semantic meaning or omit critical information such as anaphoric references (e.g., “it”, “they”).
- 3.
Balancing Efficiency and Effectiveness: Chunking must be computationally efficient while preserving sufficient detail for downstream tasks.
- 4.
Adapting to Data Formats: Different data formats (e.g., text, code, or tables) may require specific chunking strategies.
To mitigate these issues, for example, Late Chunking [164] first embeds the long document with an embedding model supporting long inputs and then conducts chunking on the embeddings. This approach ensures that each chunk embedding captures the whole contextual semantics. Sliding Window Chunking33 3 https://safjan.com/from-fixed-size-to-nlp-chunking-a-deep-dive-into-text-chunking-techniques/ divides the text into overlapping chunks of a fixed size, ensuring that contextual dependencies across chunk boundaries are preserved. Contextual Retrieval [12] leverages a long context LLM to augment the target chunk before embedding by taking the entire document as its context. The LLM generates an enriched version of the target chunk by integrating relevant contextual information from the document.
Retrieval.
The retrieval stage can be categorized into two approaches according to the retriever types: (1) Sparse Retriever which refers to the retriever that primarily uses sparse representations of text data such as TF-IDF[48], BM25[441] or Jaccard index[642]; and (2) Dense Retriever which uses dense vectors with continuous values such as BERT[101] features. Among these two approaches, dense retriever is mostly used due to its ability to capture semantic similarities rather than relying on lexical matching. By encoding queries and documents (e.g., long context) into a shared latent space, dense retriever achieves higher retrieval accuracy and extends its functionalities such as instruction-following[373], conversational search[369], complex reasoning[231], fine-grained noise filtering [654], as well as scaling laws[122] when combined with particular techniques. For example, BGE-M3[55] is a multilingual retrieval model that integrates sparse and dense retrieval, supporting an extended context window of up to 8192 tokens. ModernBERT[555] is a BERT-based model trained on 2 trillion tokens with an 8192-token context length, showcasing exceptional performance in natural language understanding (NLU) and long context retrieval tasks. REAPER [231] enhances retrieval by incorporating complex reasoning, breaking down the retrieval query into a series of planned and chained steps.
Moreover, several techniques augment the queries to enhance the retrieval quality. For example, Query2Doc [537] generates pseudo-documents using few-shot prompting and expands the original query with these documents. HyDE [134] produces a hypothetical document through an instruction-following language model, encodes it with a contrastively learned encoder, and retrieves similar real documents from the corpus using the resulting embedding vector. Rewrite-Retrieve-Read [347] employs a trainable small language model as a rewriter, optimized via reinforcement learning with feedback from the LLM, to refine the query before retrieving contexts from a web search engine and processing them with the LLM.
Generation.
After the long context being reduced by chunking and retrieval, the following step is to integrate the reduced information into the LLMs for generation. Typically, without modeling training, the reduced information is fed into the LLMs by simple context concatenation [459, 168, 208], or after further prompt compression [595]. For example, Fusion-in-Decoder [207] initially encodes all retrieved passages along with the corresponding questions into a sequence of soft features, which are then concatenated and input into the decoder-only LLM. The retrieved information can also be leveraged to adjust the decoding process. For example, kNN-LM [242] blends the model’s prediction distribution with that of the nearest neighbors from the retrieval knowledge to adjust the generation on the output side. For certain specialized model architectures, such as Retro [31], trained cross-attention modules are employed to integrate the information.
4.4 Agent-Based Methods
A LLM agent is an autonomous LLM entity that possesses a cognitive architecture consisting of several key components: perception capabilities to receive and process inputs, memory systems (both short-term and long-term) for information storage, action generation abilities for text output and tool manipulation, reflection mechanisms for self-evaluation, planning capabilities for goal setting and task decomposition, and reasoning abilities for logical thinking and decision-making [534, 580]. In the context of long context LLMs, the LLM agent leverages its memory, planning, and reflection capabilities to process long texts effectively. For example, Generative Agent [396] demonstrates these capabilities through a comprehensive architecture where agents can extract and retrieve relevant information from their memory stream, generate periodic reflections to synthesize high-level insights from low-level observations, and create detailed plans that can be dynamically adjusted based on new information or interactions. This cognitive architecture enables agents to maintain coherent understanding and generate appropriate responses even when dealing with extensive context.
Agent-based approaches for enhancing LLMs’ long-text capabilities can be broadly categorized into two main types: single-agent and multi-agent approaches. These two paradigms differ in their architectural design and operational mechanisms: (1) single-agent architectures, and (2) multi-agent systems. Single-agent approaches focus on developing comprehensive cognitive architectures within a single LLM agent entity. These methods emphasize building robust memory management systems, sophisticated planning mechanisms, and effective reflection processes. In contrast, multi-agent systems distribute the cognitive load across multiple specialized agents, each handling specific aspects of the long-text processing task. This paradigm emphasizes division of labor and collaborative problem-solving. Agents can engage in structured dialogues, debates, or collaborative analysis to understand or generate long texts more effectively.
Single-Agent Architectures.
For long-text understanding, ReadAgent [265] features a three-stage memory management approach powered by LLMs. The system first groups related content into coherent memory units, then distills these units into condensed summaries for efficient storage. When specific information is needed, it can intelligently navigate back to the source text to retrieve precise details for task completion. PEARL [483] employs a three-stage prompt framework to enhance reasoning about long documents: action mining, plan generation, and plan execution. When given a question about a long document, PEARL breaks it down into specific actions (such as summarizing, finding events, and identifying relationships), then executes these actions on the document to derive an answer. Self-Notes [262] generates multiple QA notes interleaved with the input context and the question to handle the long context reasoning problems. MemWalker [51] functions as an interactive reading system that breaks down long documents into a hierarchical structure of summaries. When given a query, it systematically explores this structured information, moving through different summary levels until it finds and collects the relevant details needed to provide an accurate response. GraphReader [288] introduces an innovative approach that transforms lengthy documents into navigable graph structures. The system deploys an AI agent that intelligently traverses this graph representation. When presented with a query, the agent begins by conducting a detailed analysis to create a search strategy. Using specialized navigation tools, it systematically moves through the graph, examining both individual nodes and their connections in a hierarchical manner. The agent maintains a dynamic record of its discoveries and continuously evaluates its progress, adjusting its approach as needed until it collects enough data to construct a comprehensive response. RoleAgent [313] employs a hierarchical memory system to distill long-text observations into shorter events, key points, and insights, enabling a coarse-to-fine information seeking during user-LLM interactions.
As for long-text generation, Re3 [611] follows an iterative five-stage process for long story generation. The process begins with the premise, where a given premise is provided to initiate the story. Based on this premise, the plan stage generates the setting, characters, and an outline using an LLM. Following this, the draft stage involves writing story continuations by prompting the model with both the plan and previously generated content. The process then enters an iterative cycle between the rewrite and edit stages: in the rewrite stage, the generated story continuations are reranked for their coherence with the plot and relevance to the premise, while in the edit stage, selected continuations are refined to ensure long-range factual consistency. This cycle of drafting, rewriting, and editing continues until the final story is generated, where the text flows naturally and aligns with the original premise. RecurrentGPT [690] builds two streams of memory flow for long-text generation, where the LLM agent is equipped with both short-term and long-term memory streams. During the generation of long text, the agent maintains and updates a short summary of the previously generated paragraphs as a part of context, which is also termed as short-term memory. Moreover, to integrate more detailed history paragraph information, the LLM agent is also enhanced with a retrieval mechanism to recall the most semantically relevant history paragraphs with the current generated paragraph as the query, which is also termed as long-term memory. Both memories are updated when new paragraph is generated.
Multi-Agent Systems.
Chain of Agent (CoA) [666] utilizes a multi-agent framework to process long context tasks. It divides the context into smaller segments, each handled by a worker agent. These worker agents sequentially communicate with a central manager agent, which synthesizes the contributions into a coherent output. This approach ensures efficient context processing by assigning each agent a short context and interleaving reading and reasoning. Similarly, LongAgent [673] employs a leader-agent model to process long texts. The leader understands the user’s intent and directs member agents to extract information from the document. An inter-agent communication mechanism resolves conflicts between agents’ responses, ensuring the leader gathers accurate data. This multi-agent approach enables efficient handling of long contexts while mitigating hallucination issues.
5 Infrastructure
In this section, we investigate the AI infrastructures that support LCLM training and inference, highlighting the key differences from those techniques typically used for general LLM. The majority of the methods discussed are designed primarily for enhanced efficiency. The others represent the perspective of the combination of engineering and algorithmic approaches, initially proposed to improve the model performance brought by the long context.
| Efficient Strategies | Computational | I/O | GPU HBM | Communication |
| Overhead | Overhead | Memory | Overhead | |
| Training | ||||
| Fundamental I/O optimization | – | ✓ | – | – |
| Data packing | – | ✓ | – | – |
| File systems | – | ✓ | – | ✓ |
| Mixed-precision training | ✓ | – | ✓ | ✓ |
| Low-precision training | ✓ | – | ✓ | – |
| Optimized memory access | ✓ | – | ✓ | – |
| Computation partition | ✓ | – | ✓ | ✗ |
| Communication-computation overlapping | ✓ | – | – | ✓ |
| Inference | ||||
| Quantization | ✗ | ✓ | ✓ | – |
| Virtual Memory management | – | ✓ | ✓ | ✓ |
| Scheduling Strategies | ✓ | – | – | – |
| Prefilling-Decoding Disaggregation | ✓ | ✓ | – | ✓ |
| GPU-CPU Parallel Inference | ✓ | ✗ | ✓ | – |
| Speculative Decoding | ✗ | ✓ | ✗ | – |
5.1 Training of LCLMs
With advancements in LLM algorithms, optimizations in training efficiency have also undergone significant innovation. Given the scale of parameters and computational complexity, distributed training is the standard solution for LLMs. Since the advent of ChatGPT, mainstream NVIDIA GPU compute resources have evolved through Volta, Turing, Ampere, Hopper, and Blackwell architectures 44 4 https://www.nvidia.com/en-us/technologies/, resulting in a hundred-fold increase in single-GPU compute capability (e.g., from 16.4 TFLOPS single precision for V100S to 2,250 TFLOPS for B200). Maximizing this compute power in a distributed setting is the key challenge in LLM training. Optimizations in computing, communication, memory management, and parallelization strategies have become standard practice and yield substantial performance gains. These approaches are integrated into prominent training frameworks such as Megatron [461], DeepSpeed [426], and FSDP [677], facilitating model development and training. Numerous surveys [331, 114, 34] have documented these foundational techniques.
Nevertheless, long context lengths introduce further challenges. Limited GPU memory, in particular, renders most common training optimizations ineffective. Reducing batch size may enable execution, but inefficient computation and memory access bottlenecks severely degrade overall training efficiency. High-performance long context training primarily explores parallel computation strategies and sophisticated communication-computation overlap to maximize hardware utilization and continuity. Specifically, these methods address I/O, GPU resource constraints, and communication bottlenecks, as illustrated in Table 5.
5.1.1 I/O Optimization
Ultimate Foundational Optimization of I/O
Training LCLMs inherently requires larger token batch sizes and significantly varying data lengths. Given constraints in memory, network bandwidth, and PCIe bandwidth, reading and transferring these large data volumes from memory to the GPU substantially slows down batch construction. Because I/O performance typically lags behind modern GPU compute performance, I/O becomes a major bottleneck in the training process. Strategic approaches, such as increasing the number of I/O threads and utilizing pinned memory, are commonly employed to mitigate this issue. However, the optimal hyperparameters for these strategic I/O optimizations require case-by-case tuning based on model size, context window length, and hardware configuration; otherwise, CPU cores or memory may become new bottlenecks.
Sophisticated Data Packing
Data packing concatenates samples into longer sequences. To maximize effective data utilization in batches, packing requires the appropriate combinatorial arrangement and essential truncation [473, 340]. Packing would alter the data reading order and the actual training distribution, potentially affecting the training performance. Attention masks can differentiate packed samples [254], ensuring isolation when necessary. However, constructing non-causal attention masks introduces fragmented operations, and non-causal attention negatively impacts training efficiency. Some methods [15, 250] employ data sampling to ensure that sample lengths follow a predefined maximum. There exist other solutions which dynamically adjust context lengths. For example, Hydraulis [278] avoids the usage of fixed context windows, but uses dynamic programming to address data sampling imbalance and data packing imbalance. Data Decomposition [408] curates data to different windows using multiple bucket sizes. Building upon these established data organization strategies, many recent pre-trained models have adopted a progressive length extension approach. This method has demonstrated significant performance improvements on commonly used long text benchmarks [675, 58, 136, 604].
Distributed File Systems and Pre-fetching
In the LLM training process, data is read from disk/network to host cache, then transferred to GPU via PCIe. In distributed training, data retrieval and distribution by CPUs are limited by PCIe bandwidth. Pre-fetching with near-end data workers [672] or caching [104] can effectively overlap I/O and computation, even hiding and eliminating the I/O latency. Upon the observation that SSD throughput and RDMA bandwidth were underutilized, 3FS [98] introduces a distributed, random-access approach, which enhances both performance and usability by leveraging the available resources more effectively.
5.1.2 Optimizations on GPU Constraints and Memory Access
Mixed-precision Training
GPU memory is a significant bottleneck in long context LLM training, with parameters, gradients, optimizer states, and especially activations (proportional to sequence length) consuming substantial resources. Reducing numerical precision [162] through low-precision or mixed-precision computation is a natural solution. Mixed-precision training [361] is a common memory optimization technique. Typically, floating-point operations use FP32 (single-precision), allocating 8 exponent bits, and 23 mantissa bits. In the memory-constrained scenarios, sacrificing some precision reduces storage requirements, e.g., FP16 requires half the storage. However, FP16’s maximum integer value of 65,536 can lead to the NaN exception or Inf exception owing to the numerical overflow. BF16, another half-precision format (requiring Ampere architecture or later), increases exponent bits, mitigating overflow at the cost of some precision. FP16/BF16 are now standard for LLM training, with FP32 reserved [529] for precision-sensitive operations (RoPE, LayerNorm, Softmax) and communication reductions (where BF16 should be avoided).
Quantization and Low-Precision Training
Recent quantized training methods incorporate quantized fine-tuning, using 8-bit floats (FP8) or integers (INT8), and preserve accuracy in the inference phase. FP8 are currently usable in TransformerEngine and other derivative acceleration libraries [671] on Hopper GPUs, primarily for less precision-sensitive matrix multiplications in Transformer layers. It applies E4M3 (4-bit exponent, 3-bit mantissa) for forward and E5M2 for backward passes, potentially offering a 2x performance boost over BF16. INT8 integers are more widely applicable, forming the basis of most current quantization methods. Weight quantization is the most intuitive approach, mapping values to 256 discrete levels within a statistically or pre-defined range for each tensor. Quantization significantly reduces memory footprint, and with appropriate hardware and software support, dequantization overhead can be fused and minimized, significantly boosting performance. However, reduced precision can irreversibly impact model performance. Some studies observe that the error can be properly compensated at critical locations in the training process [404, 632, 199]. Optimizer states are more sensitive to precision, requiring careful training with dynamic range scaling to align their distribution with the FP8 representation, reducing both memory footprint and quantization error [579, 100]. Apart from the weights and optimizer state quantization, activation quantization is also attracting significant research. Intuitively, quantizing activations leads to substantial information loss. Fortunately, latest research discovers that this loss primarily attributes to the activation outliers, where suppressing these outliers during training can enable reliable activation quantization [285, 306, 586].
Optimized Memory Access and Blockwise Computation
The quadratic time and memory complexity of the Transformer’s multi-head attention mechanism presents significant computational and memory challenges, particularly with long input sequences. FlashAttention [93] addresses this by leveraging the high bandwidth, but limited capacity, of GPU shared memory (e.g., 19TB/s bandwidth with a 20MB limit) for block-wise processing. It employs a log-sum-exp trick for optimized softmax computation and caches key values and cumulative sums to minimize memory access. FlashAttention demonstrates substantial performance gains in both standard and long context training scenarios. Alongside these optimizations for standard attention, variants like sparse FlashAttention [390] have gained traction. FlashAttention-v2 [94] refines the computation order of its predecessor, reducing non-matrix multiplications and optimizing warp scheduling within thread blocks to minimize shared memory access and maximize GPU parallelism. Furthermore, leveraging the Transformer Engine introduced with the Hopper GPU architecture, FlashAttention-v3 [444] incorporates FP8 acceleration and three key techniques: asynchronous data loading and computation via a producer-consumer model, overlapping softmax and GEMM computations, and block-wise quantization. This block-wise optimization paradigm facilitates further algorithmic and engineering co-optimization, as exemplified by NSA’s [635] hybrid approach combining token compression, selection, and a sliding window, and MoBA’s [339] block-wise attention mechanism, achieving a favorable balance between full and sparse attention using a MoE-like strategy. Similar solutions have already been verified on MLA [280].
Partition on Computation
Distributed computing with sharding effectively mitigates the memory pressure imposed by long context windows. Standard self-attention has a computational complexity of O(n2), where n is the sequence length. Ring attention [312] reduces this to O(n) by restricting each token’s attention to a fixed number of surrounding tokens, significantly decreasing computational and memory costs, and enabling the processing of longer sequences. Hybrid approaches combining local and global attention mechanisms further improve performance by maintaining long-range dependency modeling while reducing computational overhead [311, 35]. More direct methods employ various parallelization strategies: Sequence Parallelism [249] distributes model layers across devices, reducing individual device load but requiring substantial inter-device communication, and currently only shards Dropout and LayerNorm activations, leaving room for optimization. Context Parallelism 55 5 https://docs.nvidia.com/megatron-core/developer-guide/latest/api-guide/context_parallel.html divides the context window into segments processed in parallel, subsequently aggregating their representations. This effectively reduces memory requirements and increases training speed. Ulysses Parallelism [209], integrated into the DeepSpeed framework, combines the advantages of both by sharding both model layers and the context window with an interleaved strategy, minimizing communication overhead while maximizing parallel efficiency, demonstrating significant advantages for extremely long context windows.
5.1.3 Optimizations on Communication-Computation Overlapping
Distributed LLM training requires inter-node communication for gradient aggregation and intermediate calculation results. Performance discrepancies between computation and communication lead to hardware underutilization, exacerbated in long context training. Since CPUs are heavily utilized for I/O in such scenarios, offloading computation to CPUs may not yield expected gains, and thus communication optimization is crucial. Overlapping techniques enable parallel execution of forward computation with parameter gathering or backward gradient aggregation, which improves the overall efficiency. Advanced bidirectional pipeline parallelism techniques effectively mitigate pipeline bubbles [96]. Gradient Accumulation (GA) is a crucial method for improving the overlap between computation and communication. In LCLM training, high per-sample memory usage restricts local batch sizes on individual nodes. GA addresses this by implementing mini-batches: performing forward passes on smaller batches and accumulating gradients across multiple mini-batches before a single, consolidated parameter update. This allows for full parallelization of mini-batch forward passes with the preceding backward pass communication, effectively simulating large-batch training under memory constraints. However, integrating GA with DeepSpeed-ZeRO requires careful consideration. While ZeRO-1 necessitates only a single communication step during backward propagation due to its non-partitioned gradients, ZeRO-2, which partitions gradients across nodes, requires communication after each mini-batch forward pass to gather all gradient partitions, potentially hindering complete overlap. Training engines often incorporate GA as a component, leveraging different CUDA streams to enable customized optimization [472]. In LLM training, strategically utilizing distinct CUDA streams within kernels allows for optimal overlapping strategies tailored to diverse model architectures and hardware configurations [45, 243], effectively addressing discrepancies between communication and computation speeds.
5.2 Inference of LCLMs
Inference can be divided into two distinct phases: i) The prefill phase, where the input prompt is processed to generate the KV cache for large language models. ii) The decoding phase, where the model utilizes the KV cache to generate subsequent tokens. Typically, the prefill phase is compute-bound, meaning that reducing computational overhead is key to accelerating this step. In contrast, the decoding phase is bandwidth-bound, requiring optimization of memory transfer during computation to improve efficiency. In long context inference, the infrastructure faces four primary challenges: First, during the prefill stage, the computation of attention incurs a quadratic time complexity with respect to the sequence length. Besides, during generation, the use of an extremely large KV cache imposes significant memory and I/O pressure. When performing multi-device or cross-device computations, there is also a communication overhead. The challenges addressed by various approaches are delineated in the table 5.
- •
Computational Overhead. During the prefill stage, the computation of KV cache incurs a quadratic time complexity with respect to the sequence length. Research efforts aim to accelerate the prefilling process [217, 294], primarily mitigate the computational overhead. In contrast, the decoding phase is predominantly bandwidth-limited. Optimizations for decoding, such as Quantization and Speculative Decoding, often strategically trade increased computational workload for reduced memory transfer requirements.
- •
I/O Overhead. In Autoregressive Decoding, I/O operations become the primary bottleneck for speed. Each I/O operation requires transmitting both the model parameters and the KV cache into the computation unit to generate the next token. For long inputs, compressing the KV cache memory can significantly improve the speed. For long outputs, Spectulative Decoding and Model Parameters Quantization accelerate the process by reducing the memory of transmissions of model parameters.
- •
GPU HBM Memory. Long-text tasks also impose significant HBM pressure on GPUs. As a result, some approaches offload the KV cache to the CPU and use retrieval techniques to alleviate the memory usage on HBM. Quantization applied to the model parameters or the KV cache, can also help reduce the pressure on HBM memory.
- •
Communication Overhead. In large-scale deployments, it is common to cache the precomputed KV cache of prompts, and when receiving the same prompt requests, the KV cache is transmitted between different machines via communication. Memory Management and Prefilling-Decoding Disaggregation methods can optimize this aspect.
In the following subsections, we will introduce several common techniques for enhancing inference performance through AI infrastructure improvements. These techniques include: quantization, memory management, PD Disaggregation, GPU-CPU Parallel Inference, and Speculative Decoding.
5.2.1 Quantization
In long context LLMs, processing extended input sequences leads to a significant increase in Key-Value (KV) cache size. Furthermore, generating lengthy output sequences necessitates repeated transfers of both the KV cache and model parameters to computational units, exacerbating bandwidth demands. To mitigate these challenges and accelerate the decoding phase, quantization emerges as a crucial strategy by reducing the volume of data transferred. Quantization for long context LLMs can be applied to either the KV cache alone or both the model parameters and KV cache.
One strategy focuses on quantizing solely the KV cache [334, 237, 188, 658, 105]. However, due to the prevalent lack of native hardware support for mixed-precision operations (e.g., FP16 x INT4) on mainstream architectures, efficient fusion computations often necessitate the development of specialized kernels. Within KV cache quantization, common optimization techniques include: quantizing the Key and Value with different methods [334, 188], filtering outliers [188, 678], recording or adjusting the size of the channel [678, 115, 586]. In contrast, quantizing both model weights and activations to a uniform low precision [620, 678, 586, 456, 320, 637] allows for the direct utilization of existing hardware-supported low-precision operations.
5.2.2 Memory Management
Virtual Memory Management
In long context inference, the KV cache can grow extremely large, leading to memory fragmentation and inefficient usage. Virtual memory management techniques address these challenges by optimizing how KV cache memory is allocated and accessed, reducing waste and improving performance for long sequences. PagedAttention [259] utilizes virtual memory to place the KV cache of tokens at the same position across different layers and heads within the same memory page. vTensor [597] introduces a virtual memory abstraction that decouples computation from defragmentation. KV-Compress [428] extends PageAttention to support token-based KV compression.
Scheduling Strategies
When dealing with long context, especially in batched inference or scenarios with shared prefixes (like in conversational AI), efficient scheduling of KV cache and computations becomes critical. Scheduling strategies tackle this by organizing data structures to facilitate deduplication and sharing, maximizing memory utilization and computational efficiency for long inputs. ChunkAttention [623] and MemServe [191] organize data structures to enable efficient cache deduplication and sharing of common prefixes, thereby improving both memory utilization and computational efficiency. SGLang [683] use RadixAttention for sharing common prefixes between batches.
5.2.3 Prefilling-Decoding Disaggregated Architecture
Demanding both increased computation and memory for KV caches, long context LLMs inherently suffer from higher latency, resource consumption, and potential bottlenecks. To address these challenges, Prefilling-Decoding disaggregation decouples the computationally intensive prefill stage from the bandwidth-sensitive decode stage, assigning each to dedicated server pools optimized for their distinct resource demands [398, 413]. By strategically allocating hardware, PD disaggregation boosts inference efficiency, demonstrably improving both Time to First Token (TTFT) for the prefill phase and Time Per Output Token (TPOT) for decoding phase [686]. Within this paradigm, a series of research efforts have emerged to optimize different aspects of the disaggregated architecture. Distserve [686] customizes resource allocation, parallelism strategies, deployment algorithms, and runtime scheduling optimizations for each stage. Splitwise [398] investigates how to allocate machines within a cluster to handle the prefill phase and decoding phase effectively. Mooncake [413] particularly excelling in long context scenarios and under heavy user loads, developed a prediction-based early rejection policy. CacheGen [332] reduces the transmission time of precomputed KV caches across machines by adopting an optimized storage format. LoongServe [564] proposes an elastic sequence parallelism method that dynamically adapts to different requests and phases, enhancing computation, communication, and GPU memory efficiency. These studies collectively highlight the potential of PD disaggregation to accelerate LLM inference, paving the way for more scalable and cost-effective deployment of these powerful models.
5.2.4 GPU-CPU Parallel Inference
GPU memory, designed for high-bandwidth access by computational units, is inherently limited and frequently inadequate to accommodate the ever-growing size of the KV cache, especially in long context scenarios. A cost-effective strategy to mitigate this constraint is offloading the KV cache to CPU memory, with the potential for further offloading to hard disk or network storage [601, 216]. While offloading reduces GPU memory pressure, it introduces a new bottleneck: the slow PCIe bus becomes a limiting factor when transferring the KV cache from CPU to the GPU for computation [628, 174]. To mitigate the issue of slow PCIe bandwidth, GPU-CPU Parallel Inference methods leverage concurrent CPU computation during PCIe transfers to either reduce the amount of data that needs to be transferred or optimize subsequent GPU computations, thereby improving overall efficiency. FlexGen [456] and PipeSwitch [20] are techniques that attempt to overlap GPU-based computation of the current layer with the concurrent loading of the KV cache for the subsequent layer. FastDecode [174] proposes computing attention scores directly on the CPU, leveraging its faster memory access to the KV cache relative to the GPU. Another methods employ CPU-GPU heterogeneous execution strategies to mitigate data transfer overhead by strategically performing computations on the CPU [601, 628, 395].
5.2.5 Speculative Decoding
In long output scenarios, the decoding phase becomes a dominant factor in overall inference time. Greedy Decoding requires transmitting the model parameters for every new token computation. Speculative Decoding, on the other hand, accelerates this process by generating multiple potential tokens in a single pass and processing them together, thereby reducing the frequency of transferring model parameters from HBM to the computation units. Specifically, Speculative Decoding [271] consists of a smaller draft model and a larger target model, the core idea is: (1) The draft model generates candidate tokens. (2) The target model verifies the tokens simultaneously. (3) The target model then either generates the first rejected token or adds a new token if all previous tokens are accepted. Self-Speculative Decoding [187, 649, 116] leverage layer-skipping techniques to use the target model itself as the draft model, thereby reducing the overhead associated with maintaining a separate draft model. This approach sometimes allows the draft model and the final model to share the KV cache [116], further optimizing resource usage. MagicDec [52] and TRIFORCE [480] use a draft model with a fixed KV budget using sparse attention. While the aforementioned methods effectively reduce or eliminate the overhead of a separate draft model, an alternative body of research demonstrates that significant performance gains can be achieved by carefully designing the architecture of a dedicated draft model. To enhance draft model accuracy in speculative decoding, various architectural modifications have been proposed. One line of work involves adding specialized components to the draft model; for example, Medusa [39] employs multiple FFN heads, while Eagle [297] incorporates features from the larger model’s embeddings. Another promising direction explores alternative model architectures entirely, such as using a Mamba-based model for token prediction [81], fully leveraging the efficiency of State Space Models(SSMs). More details about Speculative Decoding can be seen in this survey [584].
6 Evaluation
This section introduces the evaluation of long context models. We generally divide the capacity of long context modeling into two aspects: processing long inputs and generating long outputs, namely Long Context Comprehension and Long-Form Generation.
For long context comprehension, we will first introduce its evaluation paradigm (Sec. 6.1.1), then summarize recent benchmarks (Sec. 6.1.2), and discuss how to design better benchmarks for long context comprehension (Sec. 6.1.3). For long-form generation, we will first review its definition and introduce representative benchmarks (Sec. 6.2.1). Then, we summarize the data sources (Sec. 6.2.2) and present the commonly used evaluation methods (Sec. 6.2.3). After that, we discuss the challenges and trends in long-form generation (Sec. 6.2.4).
6.1 Evaluating Long Context Comprehension
6.1.1 Evaluation Paradigm
This section presents the evaluation paradigm for long context comprehension. As shown in Figure 7, we categorize the capabilities of LCLMs in processing long inputs into five hierarchical levels: language modeling, retrieval, aggregation, reasoning, and real-world adaptation. At the foundation lies language modeling, which is the most basic capability for understanding the input text. Building upon this foundation, retrieval, aggregation, and reasoning constitute the core capabilities for long-text modeling. For each of these three capabilities, we provide a detailed taxonomy along with corresponding synthetic tasks specifically designed to evaluate each aspect. At the highest level, real-world adaptation examines how well LCLMs can leverage their long context capabilities in practical scenarios. Specifically, we provide a detailed introduction to the most representative long context tasks, including question answering, summarization, document retrieval & reranking, retrieval-augmented generation, many-shot in-context learning, coding, etc. Performance on these tasks are among the most important indicators for assessing LCLMs’ long-text understanding abilities.
Language Modeling
Language modeling is the most fundamental capability for long context comprehension. Typically, a low perplexity is an indicator that the model have good understanding of the given input document. In the realm of long context modeling, it is not only required that LCLMs have an overall low perplexity, but also that this perplexity decreases as the context window grows, indicating that the models can make more accurate predictions of target tokens by fully utilizing the rich context information. In practice, there are two common ways to examine the efficacy of LCLMs through the lens of perplexity. The first way is to inspect cumulative average negative log-likelihood (NLL) as token position in long documents increases, as exemplified by Gemini-1.5 [503]. A decreasing trend in this cumulative NLL indicates that model can make better predictions of future tokens as the context window grows. An alternative way is to inspect PPLs calculated by the sliding window approach [410, 60, 698] under various window sizes. Specifically, the sliding window approach have a pre-defined window size . The model first predicts the probability of the beginning tokens, then gradually slides the window forward to process the remaining tokens and calculate overall PPL. In this case, a decreasing PPL as the window size increases indicates that the model can effectively utilize long context information.
Retrieval
Retrieval requires LCLMs to identify and extract target information from one or multiple locations within long contexts. This capability underlies most long context tasks, as they typically require implicit retrieval of relevant content before subsequent processing.
- •
Categories The retrieval capability comprises two distinct levels based on their complexity: Explicit Retrieval and Semantic Retrieval. Explicit retrieval refers to string matching based on given queries, where models must locate and extract matching content from the source text. Semantic retrieval, which is typically more challenging, requires models to extract semantically relevant content based on the semantic meaning of queries.
- •
Synthetic Tasks Needle Retrieval (or Needle-in-a-Haystack, NIAH) serves as a prototypical synthetic task to evaluate retrieval capabilities. This task inserts one or more needles into a long sequence and queries the model to retrieve the corresponding needles [371, 236, 190, 284, 594, 697, 277, 315, 17, 430]. The specific instantiation of needles and documents takes on various forms. The needles can be n-digit numbers, specific sentences, UUIDs, dictionaries, functions, passages, etc. while documents can be repeated noisy sentences, meaningful content extracted from essays, code repositories, or other sources. In line with capability categorization, the needle retrieval task includes explicit and semantic variants. In Explicit (or Literal) Needle Retrieval, models simply need to perform exact matching of needles, such as locating the completion of a partial sentence within a long text [371, 236, 190, 284, 277]. Semantic Needle Retrieval, however, requires models to identify content based on semantic correspondence [370], such as retrieving paragraphs based on their abstracts [17, 697] or functions based on their behavioral descriptions [315]. Notably, while these needle retrieval tasks primarily assess retrieval capabilities, they can be highly challenging and thus serve as crucial evaluation tasks for long context modeling abilities.
Aggregation
Aggregation refers to the model’s ability to integrate information from multiple locations or even globally across long contexts. Building upon retrieval capabilities, this competency encompasses two key aspects: first, it requires the model to process the text piece-by-piece across multiple locations or even the entire context; second, it demands the model to recognize meaningful connections between these pieces and synthesize them into coherent higher-level representations.
- •
Categories Based on the nature of aggregation targets, Aggregation can be further divided into two types: Statistical Aggregation and Semantic Aggregation. Statistical Aggregation requires models to perform quantitative analysis over long contexts, while Semantic Aggregation focuses on combining and synthesizing semantic information from different parts of the context.
- •
Synthetic Tasks A variety of synthetic statistical tasks have been proposed to evaluate Statistical Aggregation capabilities [469, 190, 663]. These tasks include tracing variable states, extracting frequent patterns, computing descriptive statistics (e.g., maximum, median, mode), and performing other numerical operations across extended sequences. For Semantic Aggregation, SummHay [260] requires LCLMs to process the synthesized Haystack of documents and generate a summary. Additionally, some synthetic tasks specifically focus on solely evaluating the model’s piece-by-piece processing capability across long context, such as stacked news labeling [418] and stacked typo detection [418].
Reasoning
Long context reasoning refers to LCLMs’ ability to perform logical inference over information distributed across long contexts. While both reasoning and aggregation involve identifying and processing multiple pieces of information, reasoning further emphasizes the logical deduction and inference process rather than mere information collection and summarization.
- •
Categories In the realm of long context comprehension, Reasoning can be further categorized into Parallel Reasoning and Iterative Reasoning. Parallel Reasoning involves gathering all relevant information first before conducting the reasoning process, while Iterative Reasoning requires a step-by-step approach, where each reasoning step informs the next information gathering target, forming a continuous cycle until reaching the final conclusion.
- •
Synthetic Tasks In this aspect, multi-needle reasoning serves as a prototypical synthetic task that emphasizes both parallel reasoning and iterative reasoning capabilities. It requires models to reason across multiple needles distributed throughout a long document [284, 256]. These needles are typically logically related facts extracted from existing reasoning benchmarks. For example, the BABILong benchmark [256] utilizes samples from the bAbI dataset [558] as needles, while NeedleBench [284] opts for the R4C dataset [206].
Real-World Adaptation
Real-world adaptation represents the highest level in the capability hierarchy for long context comprehension, where models must effectively integrate and apply their fundamental capabilities (language modeling) and core capabilities (retrieval, aggregation, and reasoning) to address practical challenges. Unlike synthetic tasks that evaluate specific capabilities in controlled settings, real-world tasks present complex scenarios that often require multiple capabilities working in concert. These tasks not only test models’ individual capabilities but also their ability to appropriately combine and deploy these capabilities based on task requirements. Introductions to the most representative real-world tasks involving long context comprehension are provided below. For each task, we use stars to denote which of the three core capabilities - retrieval , aggregation , and reasoning - the task tends to rely more heavily on.
- •
Question Answering [ / / ] The Question Answering task requires models to provide accurate answers based on real-world long contexts and queries. These questions and contexts span diverse domains, including literature (NarrativeQA [246], QuALITY [393], LStQA [418], NoCha [239]), academic papers (Qasper [95]), encyclopedias (WikiQA [615], HotpotQA [617], 2WikiMultihopQA [184], DuReader [177], AltQA [391]), conversation history (LCvMem [418]), financial reports (DocFinQA [427]), structured data (Table QA [661]), hybrid scenarios (MultiFieldQA [17]), etc. Notably, due to the diversity of questions and domains, different QA tasks may emphasize different aspects of long context capabilities - some requiring primarily information retrieval, others focusing on information aggregation across multiple parts, and yet others demanding complex reasoning over the aggregated information.
- •
Summarization [] Summarizing key information from long sequences of text has long been a crucial research area in NLP. Throughout the development of this field, researchers have created diverse summarization datasets spanning nearly all sorts of relevant domains, including novels ([663], LStSum [418], SQuALITY [524]), government reports (GovReport [196]), meeting scripts (QMSum [684], VCSUM [567]), news articles (MultiNews [118]), patents (BigPatent [452]), screenplays (SummScreen [59]), legal documents (MultiLexSum [454]), and more. Notably, long context summarization also stands as one of the primary application scenarios for long context models.
- •
Document Retrieval and Reranking [ / ] Document Retrieval and Reranking are crucial components of modern Information Retrieval (IR) systems, responsible for retrieving relevant documents from a pool of candidates and reordering them based on their relevance to the query, respectively. The advent of LCLMs has enabled a new paradigm where models directly process all candidate documents and produce their rankings in a generative manner [484, 349, 536]. Conversely, retrieval and reranking performance can serve as indicators of these models’ long context capabilities, with the former emphasizing the ability to retrieve relevant information and the later focusing on reasoning across different portions of long context [264, 625]. For example, the HELMET benchmark includes a Reranking test where candidate documents are sampled from the MSMARCO [381] retrieval dataset, and LCLMs are challenged with generating top-10 document IDs ranked by relevance. Beyond relevance-based reranking, the task encompasses broader forms of sequence organization, such as timeline ordering [540, 279, 651] and paragraph order reconstruction [107].
- •
Retrieval-Augmented Generation [] Retrieval-augmented generation enhances the accuracy and reliability of generative models by providing them with a corpus of facts retrieved from external sources. In long context scenarios, where the input corpus can extend up to 1M tokens [264], relevant information becomes more dispersed and sparse, challenging LCLMs’ ability to aggregate information across extended contexts. Existing evaluation approaches [264, 625] primarily employ open-domain QA to assess LCLMs’ performance in retrieval-augmented generation. These evaluations typically process open-domain QA datasets such as Natural Questions [258], TriviaQA [232], and HotpotQA [617] by concatenating their passages into a large corpus. The model input consists of this corpus along with queries targeting specific passages, requiring LCLMs to locate relevant information within the extended corpus to generate appropriate answers.
- •
In-Context Learning [] With extended context window size, In-Context Learning (ICL) expands the scale of demonstration examples from dozens, as seen in traditional ICL frameworks, to hundreds or even thousands. This scenario challenges LCLMs to generate precise predictions based on this substantially larger set of examples[290, 599, 264, 27]. Recent empirical studies have revealed that existing LCLMs exhibit several limitations in this setting: they demonstrate significant performance degradation beyond certain context lengths, show susceptibility to example ordering effects, display recency bias by favoring predictions aligned with labels presented near the sequence terminus, etc. [290, 599] These findings indicate that there remains a substantial journey ahead for LCLMs to fully unleash the potential of ICL.
- •
Code Relevant Real-World Tasks [] Processing repository-level code represents a particularly compelling application scenario that necessitates LCLMs. Among various specific tasks, code completion has garnered significant attention due to its comprehensive reflection of a model’s capability to process entire repositories [30, 323, 642, 225]. Additionally, several tasks address other potential challenges in repository-level code processing, including CI builds repair, commit message generation, bug localization, module summarization, execution simulation, code translation, etc. [30, 663, 550]. Despite significant advances, the intrinsic complexity of repository-level code still poses substantial challenges for current LCLMs in addressing real-world code processing requirements, as demonstrated by their performance limitations on SWE-Bench [225].
6.1.2 Evaluation Benchmarks
| Benchmark | Support | Characteristics | Target | Eval | Metrics |
| Length | Aspects | Setup | |||
| General Domain Synthetic Benchmarks | |||||
| Ada-LEval [527] | 128k | Adaptable length | M G | Auto | |
| BABILong [256] | 10m | BAbI in long context | G | Auto | |
| DENIAHL [89] | 4k | Different NIAHs | G | Auto | |
| HoloBench [352] | 64k | Database aggregation&reasoning | G | Auto | |
| LIFBENCH [575] | 128k | Instruction-following&stability, new metric | G | Auto | |
| LongIns [138] | 16k | Instruction-centric | G | Auto | |
| LongPiBench [513] | 256k | Focusing on position bias | G | Auto | |
| LongRangeArena [499] | 16k | Early attempts, multiple modalities | C | Auto | |
| LongReason [307] | 128k | Long Context reasoning | M | Auto | |
| mLongRR [3] | 64k | Multi-lingual retrieval&reasoning | G | Auto | |
| M4LE [257] | 8k | Bilingual, semi-realistic | M G | Auto | |
| Michelangelo [520] | 128k | Latent structure queries | G | Auto | |
| MLNeedle [181] | 32k | Multilingual NIAH | G | Auto | |
| NeedleThreading [430] | 900k | Different NIAHs | G | Auto | |
| NoLiMA [370] | 32k | Semantic NIAHs w/ minimal lexical overlap | G | Auto | |
| RULER [190] | 128k | Different NIAHs + other synthetic tasks | G | Auto | |
| S3Eval [268] | 80k | SQL-centric | G | Auto | |
| SummHay [260] | 100k | Synthetic tasks for summarization | G | LLM | |
| Specific Domain Synthetic Benchmarks | |||||
| LongHealth [2] | 8k | Medical, fictional patient cases | M | Auto | |
| MathHay [533] | 128k | Mathematical retrieval&reasoning | G | Hybrid | |
| RepoQA [315] | 16k | Code-style NIAH | G | Auto | |
Following the evaluation paradigm established in Section 6.1.1, we present a comprehensive overview of recent long context comprehension benchmarks. These benchmarks can be categorized into two groups: synthetic benchmarks (Table 6) that are entirely constructed using heuristic rules, and real-world benchmarks (Table 7) that primarily consist of real-world tasks with human annotations. For each benchmark, we present its supported length (maximum token count), characteristics, evaluation setup, and evaluation metrics. The evaluation setup encompasses four main formats: multiple-choice question answering with provided options, free-form generation, classification, and language modeling. The evaluation metrics include automatic metrics, LLM-as-a-Judge approaches, and hybrid methods combining both. Additionally, for synthetic benchmarks, we annotate their primary focus on specific aspects of long context comprehension capabilities, as these artificial tasks are typically designed to test particular comprehension skills. For real-world benchmarks, we document their covered scenarios, including Question Answering, Summarization, Document Retrieval & Reranking, Retrieval-Augmented Generation, In-Context Learning, Code-Relevant Tasks, and various synthetic tasks.
| Benchmark | Support | Characteristics | Scenarios | Eval | Metrics |
| Length | Setup | ||||
| General Domain Real-World Benchmarks | |||||
| BAMBOO [107] | 16k | Multi-task | M G L | Auto | |
| CLongEval [418] | 100k | Chinese, human-curated (partly) | G | Auto | |
| DetectiveQA [600] | 250k | Bilingual, human-curated, detective novels | M | Auto | |
| ETHIC [266] | 100k | Requiring high information coverage | G | Hybrid | |
| InfinityBench [663] | 100k | Bilingual, long average length | G | Auto | |
| HELMET [625] | 128k | Application-centric, robust eval | M G | Auto | |
| L-CiteEval [498] | 48k | Answer with citations (faithfulness) | G | Auto | |
| L-Eval [8] | 200k | Diverse data, improved metrics | G | Hybrid | |
| LIBRA [85] | 128k | Long benchmark for Russian analysis | G | Auto | |
| LOFT [264] | 1m | Real tasks of extreme lengths | M G | Auto | |
| Long2RAG [412] | 32k | Long retrieval&output + new metric | G | Auto | |
| LongBench [17] | 16k | Bilingual, application-centric | G | Auto | |
| LongBench-v2 [18] | 2m | Challenging tasks, expert curation | M | Auto | |
| LongBench-Cite [645] | 70k | QA with citations (trustworthiness) | G | Auto | |
| LongICLBench [290] | 50k | Extreme-label classification | M G | Auto | |
| LongMemEval [566] | 1.5m | Long-term chat memory | G | Hybrid | |
| Loong [540] | 250k | Bilingual, semi-realistic, human-curated | G | LLM | |
| LooGLE [279] | 24k | Human curation, long dependency | G | Hybrid | |
| LV-Eval [636] | 256k | Adaptable length, less knowledge leakage | G | Auto | |
| ManyICLBench [704] | 128k | Extensive ICL test, new metric | M G | Auto | |
| Marathon [651] | 80k | Human curation, multi-choice QA | M | Auto | |
| NoCha [239] | 336k | Global reasoning over entire novels | G | Auto | |
| TCELongBench [670] | 12k | Temporal complex events | M G | Auto | |
| ZeroSCROLLS [445] | 8k | Early attempts | G | Auto | |
| Specific Domain Real-World Benchmarks | |||||
| DocFinQA [427] | 200k | Finance, FinQA in long context | G | Auto | |
| FinTextQA [53] | 30k | Finance | G | Hybrid | |
| LongCodeArena [30] | 2m+ | Code-centric | G | Auto | |
| MedOdyssey [120] | 200k | Medical, diverse tasks, new metrics | G | Auto | |
| NEPAQuAD1.0 [406] | 600k | Environmental statements&acts | G | Hybrid | |
Based on Table 6, we make several observations about existing synthetic benchmarks. First, a significant portion of synthetic benchmarks consists of various NIAH task variants, featuring more complex forms or different domains, essentially evaluating the robustness of models’ long context retrieval capabilities. Second, most synthetic benchmarks rely solely on automatic metrics such as accuracy and F1 scores, with only a few requiring LLM or hybrid evaluation approaches when assessing longer generated outputs like summaries or mathematical reasoning processes. Third, the controlled construction process of synthetic benchmarks enables systematic comparisons of specific factors such as language, position, and patterns under controlled variables.
Analysis of Table 7 reveals several patterns in real-world benchmarks. First, Question Answering emerges as the most prevalent scenario, which aligns with the inherent diversity of QA tasks, followed by summarization tasks. Second, some real-world benchmarks adopt multiple-choice QA formats to guide model generation, possibly due to the diverse nature of real-world task outputs where unconstrained generation might complicate evaluation. Third, interestingly, not all real-world benchmarks rely entirely on human annotations; many incorporate synthetic tasks, likely to ensure comprehensive evaluation coverage.
Furthermore, examining both synthetic and real-world benchmarks collectively reveals that medical, financial, and code-related domains particularly demand strong long context processing capabilities.
6.1.3 Discussion
What Makes Good Benchmarks for Long Context Comprehension
From a high-level perspective, an effective long context comprehension benchmark should satisfy three key requirements: coverage of sample lengths matching models’ context windows, evaluation of fundamental long context modeling capabilities, and assessment of downstream task performance. Given that current LCLMs typically feature context windows exceeding 128k tokens, benchmarks primarily focusing on documents under 32k tokens may inadequately assess the capabilities of mainstream LCLMs. For fundamental capabilities, including retrieval, aggregation and reasoning as discussed in Section 6.1.1, the main challenges lie in the dispersion of key information and the difficulty of extraction [152], with more dispersed and semantically oriented (rather than literal) information posing greater challenges [370]. Although synthetic tasks are particularly well suited for evaluating these aspects, research indicates that excellence in synthetic tasks alone does not guarantee downstream competence. Therefore, comprehensive benchmarks must incorporate specific downstream long context tasks, particularly question answering, summarization, RAG, and in-context learning, which serve as a relatively complete proxy for real-world applications. A final notable trend in evaluation methodology is the increasing formulation of tasks such as multiple choice question answering, allowing direct performance assessment through accuracy measurements.
6.2 Evaluating Long-Form Generation
Beyond long context comprehension, where the inputs are lengthy, another common paradigm for long context modeling is long-form generation, where the outputs are lengthy. Long-form generation is a classic task in the field of NLP [563, 32, 80]. In the realm of LLMs, the increasing practical demand for document-level text generation [633, 519, 344] and repository-level code completion [317, 526] has brought growing attention to long-form generation, leading to the emergence of several evaluation benchmarks and improvement approaches [420, 19]. In this subsection, we first review the definition of the long-form generation and introduce representative benchmarks. Then, we summarize the data sources and present the commonly used evaluation methods. After that, we discuss the challenges and trends in long-form generation. The overview of long-form generation is illustrated in Figure 8.
6.2.1 Evaluation Benchmark
long-form generation is generally defined as generating long, coherent, and contextually relevant text in response to a given input or instruction. To better understand the scope of the long-form generation, we provide the following clarification:
First, the instruction must either explicitly or implicitly indicate the necessity for a long response. Explicit requirements refer to instructions that clearly specify the expectation for a long response, either through a specified word count or a direct statement. Implicit requirements, in contrast, do not specify a desired length but instead arise from tasks that inherently demand detailed responses. For instance, open-ended questions often require comprehensive examples or in-depth discussions to effectively convey a perspective, naturally leading to longer responses compared to close-ended questions.
Second, the definition of what qualifies as a “long” response varies based on the nature of the task. In the context of a writing task, a response is typically considered long if it exceeds 1,000 words, whereas in a question-answering task, a response may be regarded as long if it surpasses 500 words. Accordingly, long-form generation can be defined as tasks that require responses substantially exceeding the average length associated with the specific task type.
| Benchmark | Size | Task | Target Aspect | Source | Eval Method |
|---|---|---|---|---|---|
| ELI5 [119] | 272K | QA | General | Web | Auto, Human |
| MS-NLG [381] | 183K | QA | General | User | Auto |
| ExpertQA [355] | 2K | QA | General | CrowdSrc | Auto |
| ProxyQA [490] | 100 | QA | General | CrowdSrc | LLM |
| LongGenBench-HKUST [326] | 16K | QA | General | PADs | Auto |
| ASQA [475] | 6K | QA | Ambiguous | PADs | Auto, Human |
| QASA [267] | 2K | QA | Scientific | CrowdSrc | Auto |
| CLAPNQ [432] | 5K | QA | RAG | PADs | Auto, Human |
| Long2RAG [412] | 280 | QA | RAG | PADs | Auto |
| LFMedQA [189] | 1K | QA | Medical | User | LLM |
| MedLFQA [213] | 5K | QA | Medical | PADs | Auto |
| FActScore [365] | 183 | QA | Factual | Web | LLM |
| LongFact [556] | 1K | QA | Factual | Synthesis | LLM |
| LTF-TEST [214] | 12K | QA | Fairness | Synthesis | LLM |
| AQUAMUSE [252] | 6K | Summ | General | Web, PADs | Auto, Human |
| Multi-News [118] | 56K | Summ | General | Web | Auto, Human |
| LCFO [88] | 252 | Summ | General | PADs | Auto, LLM, Human |
| LongForm-C [248] | 28K | IF | General | PADs | Auto |
| Suri [405] | 20K | IF | General | PADs | Auto, Human |
| LongBench-Write [19] | 120 | IF | Writing | User | Auto, LLM |
| LonGen [419] | 240 | IF | Writing | User | Auto, LLM |
| LOT-OutGen [161] | 2K | IF | Writing | Web | Auto, Human |
| LongLaMP [253] | 63K | IF | Personalized | PADs | Auto |
| DoLoMiTes [354] | 2K | IF | Structured | Web | LLM |
| LongGenBench-SUTD [576] | 400 | IF | Structured | Synthesis | Auto |
| LongProc [624] | 2K | IF | Structured | PADs | Auto |
| HelloBench [420] | 647 | Mixed | General | Web, PADs | LLM, Human |
| FACTS Grounding [211] | 2K | Mixed | Factual | CrowdSrc | LLM |
Table 8 lists representative benchmarks for long-form generation. We summarize the task types of long-form generation into four categories: Question Answering (QA), Summarization (Summ), Instruction Following (IF), and Mixed.
Question Answering (QA)
In long-form generation, QA mainly refers to long-form QA. ELI5 [119] is the first large-scale benchmark for long-form QA, where the task is to generate multi-sentence explanations in response to open-ended questions sourced from Reddit. Similarly, MS-NLG is a subset of MS MARCO [381] that focuses on natural language generation. In addition to general long-form QA, ASQA [475] and QASA [267], which focus on ambiguous questions and scientific questions, respectively. In the realm of LLMs, ExpertQA [355] and ProxyQA [490] are high-quality long-form QA benchmarks with questions crafted by experts across various fields, along with expert-verified golden answers. Retrieval Augmented Generation (RAG) is an important application of LLMs, CLAPNQ [432] and Long2RAG [412] are benchmarks designed to evaluate LLM-based RAG systems. Besides, generating long-form and well-supported responses is particularly essential in high-stakes domains such as medicine [189, 213]. Although LLMs have demonstrated strong performance in many tasks, they often contain factual errors when generating long responses [556]. Min et al. [365] propose a novel framework for factual evaluation, comprising three steps: decomposing the response into atomic facts, annotating each fact as supported, unsupported, or irrelevant, and computing the proportion of supported facts. In addition to concerns related to factuality, long-form responses are also susceptible to biases. To evaluate fairness in long-form generation, Jeung et al. [214] propose an evaluation framework that covers 14 topics and 10 demographic axes.
Summarization (Summ)
Summarization is a classic task in long context modeling. As input documents become increasingly numerous and lengthy, the length of summaries has also grown significantly. Compared to early summarization benchmarks where summaries were around 50 words long [378], recent summarization benchmarks feature much longer summaries. As a result, summarization not only evaluates a model’s ability to comprehend and condense long input documents but also tests its capability for generating long-form summaries. Multi-News [118] is the first large-scale multi-document news summarization benchmark, collected from newser.com. AQUAMUSE [252] proposes a scalable method to automatically mine summarizations from Natural Questions [258] and Common Crawl. LCFO [88] is a human-annotated benchmark for evaluating long context summarization and summary expansion, consisting of 252 long documents from diverse domains.
Instruction Following (IF)
Apart from using questions as inputs for LLMs, instructions and other forms of prompts can also serve as inputs. Such tasks prioritize the evaluation of a model’s ability to follow instructions, encompassing both straightforward instruction adherence and more complex, constrained instruction-following. To evaluate the ability of LLMs in structured problem-solving, DoLoMiTes [354] consists of 519 domain-specific long-form methodical tasks with 1,857 examples collected from experts across 25 fields. Similarly, LongGenBench-SUTD66 6 In fact, there are two benchmarks named LongGenBench [576, 326]. To distinguish them, we add the suffix of the respective primary institution. [576] and LongProc [624] are designed to evaluate the capability of LLMs to generate high-quality long-form text while adhering to complex instructions. Besides, LongLaMP [253] is a benchmark for personalized generation, covering four tasks: personalized email completion, abstract generation, review writing, and topic writing. Recently, increasing attention has been given to aligning LLMs with long-form output instructions, such as creative writing and story generation. To enhance instruction tuning for long-form generation, LongForm-C [248] gathers instruction-following examples via reverse instructions on C4 and English Wikipedia. Bai et al. [19] propose a long instruction-following dataset LongWriter-6K aimed at extending the output length of existing models to over 10,000 words. Similarly, Suri [405] is a benchmark consisting of 20,000 long-form human-written texts, each paired with backtranslated instructions with multiple constraints. Quan et al. [419] propose Self-Lengthen, an iterative training framework that utilizes LLMs’ intrinsic knowledge without relying on auxiliary data. To evaluate its effectiveness, they introduce LongGen, a benchmark for evaluating LLMs’ long-form generation capabilities in Chinese and English across various tasks, with length-constrained user instructions and corresponding responses.
Mixed
Some benchmarks include multiple task types to enable more comprehensive evaluation. Facts Grounding [211] evaluates LLMs’ ability to generate factually accurate long-form text based on a given context and user requests, encompassing tasks QA, summarization, and document rewriting. HelloBench [420] is a comprehensive benchmark for evaluating LLM’s long-form generation capabilities, consisting of 647 samples across 38 subcategories and 5 tasks (QA, summarization, chat, completion, generation), sourced from real-world scenarios and publicly available datasets.
6.2.2 Data Source
The data source of a benchmark determines its data quality. A reasonable, high-quality, and easily accessible data source can significantly enhance the overall quality of the benchmark. Data sources for long-form generation benchmarks can be categorized into five types:
- •
Web-Sourced Data: Web contains abundant and vast amounts of text content. The advantage of web-sourced data is its richness and diversity. However, not all web content meets high-quality standards and typically necessitates processes such as data cleaning and deduplication. Among long-form generation benchmarks, ELI5 [119] collects QA pairs from Reddit, FActScore [365] gathers people biographies from Wikipedia, and LOT-OutGen [161] collects human-written stories by crawling web pages.
- •
User-Sourced Data: The main characteristic of user-sourced data is its practicality, as it reflects real-world scenarios faced by users. For example, MS-NLG [381] collects data from users’ search logs on Bing. LongBench-Write[19], LonGen [419], and LFMedQA [189] collect user data from their respective platforms: GLM, Qwen, and Lavita Medical AI Assist.
- •
Synthetic Data: Synthetic data is also a commonly used method for constructing benchmarks. This method refers to predefining a template and then filling it with different content to achieve both structure and diversity. The content can either be predefined or AI-generated. Benchmarks like LongFact [556], LTF-TEST [214], and LongGenBench-SUTD [576] are constructed using this method.
- •
Crowdsourcing (CrowdSrc): Data collection processes are usually non-automated, requiring human involvement to ensure data quality. ExpertQA [355], ProxyQA [490], and QASA [267] collect questions from experts. Specifically, ExpertQA recruits experts through Prolific to write questions within their areas of expertise. ProxyQA manually creates meta-questions with the help of five experienced researchers. QASA involves AI/ML researchers to label data. Meanwhile, FACTS Grounding [211] instructs third-party human raters to design prompts that require both the processing of long-form input and the generation of long-form output.
- •
Publicly Available Datasets (PADs): “Standing on the shoulders of giants” is also an effective strategy for data collection. On one hand, the data quality of previous datasets is generally reliable, on the other hand, previous datasets often exhibit consistency, making it easier to process and adapt them. Many long-form generation benchmarks source their data from publicly available datasets. For example, LongGenBench-HKUST [326] collects its data from MMLU [180], GSM8K [86], and CommonSenseQA [489]. ASQA [475] sources its data from AMBIGQA [366]. Long2RAG [412] sources its data from ELI5.
6.2.3 Evaluation Paradigm
Evaluation methods are critical for benchmarks, as an appropriate evaluation method can provide a unified standard for evaluating the performance of different models, highlight their strengths and weaknesses, and guide model iteration. Evaluating the performance of long-form generation presents significant challenges. Here, we summarize the evaluation methods used in existing long-form generation benchmarks and categorize them into three types, offering insights for the development of future evaluation methods.
Automatic Metrics
Automatic metrics are evaluation methods that evaluate model-generated responses without the need for additional human involvement or the use of LLMs. Most traditional metrics are classified as automatic metrics. Existing automatic metrics in the field of long-form generation can be categorized into four types:
- •
Semantic Aspect: This type of metrics evaluates the semantic aspect of the response. Metrics like ROUGE [305] and BLEU [394] are the most commonly used and were initially developed for summarization tasks and machine translation tasks. ROUGE and BLEU measure the semantic similarity between the response and the reference answer, providing an indication of the generation quality of LLMs. They are adopted as evaluation metrics in 13 out of 28 benchmarks. Similarly, METEOR [21] is also used to measure the semantic similarity and is applied in LongForm-C [248] and LongLamp [253]. Besides, BERTScore [657] is a metric that evaluates the semantic similarity of two texts using a finetuned BERT model [213].
- •
Repetitive Aspect: These metrics evaluate the repetitiveness or fluency of the responses. For instance, Perplexity (PPL) [303] calculates the overall probability of the response. Lower perplexity indicates higher fluency and suggests the sentence is more likely to be generated by an LLM. Metrics like Repetition [450] and Distinct [281] are used to measure repetitiveness. Repetition-n calculates the percentage of n-grams that appear at least twice in the text, while Distinct-n quantifies text diversity by computing the number of unique n-grams in the output. These metrics are used in the LOT-OutGen [161] and LCFO [88].
- •
Accuracy-Based: Accuracy is more commonly used in short-form generation scenarios like multiple-choice QA. In long-form generation, LongGenBench-HKUST [326] combines multiple questions into a single input, requiring the model to generate responses for all of them. Each response is paired with a corresponding standard answer (either a specific option or a number), making it well-suited for accuracy-based evaluation. Wu et al. [576] propose the CR and STIC metrics, both designed to measure the accuracy of responses in specific aspects. In addition, QASA [267] uses the standard accuracy as the evaluation metric.
- •
Task-Specific: Due to the varying focus of different benchmarks, task-specific metrics are often used. For example, ExpertQA [355] uses QAFactEval [117] to evaluate the factual consistency of the responses, while ASQA [475] uses Disambiguation Metrics to evaluate whether the response resolves ambiguities. Retrieval-oriented metrics, such as nDCG [432] and KPR [412], are used in CLAPNQ and Long2RAG to evaluate the effectiveness of the LLM-based RAG systems.
Human Evaluation
Although automatic metrics are convenient, recent studies have shown that the correlation between automatic metrics and human evaluation is quite low [251, 596]. To achieve more accurate evaluations, the best approach is to establish standardized evaluation criteria and have human evaluators evaluate the responses of LLMs [433]. ELI5 [119], ASQA [475], Long2RAG [412], AQUAMUSE [252], Multi-News [118], LongForm-C [248], LongBench-Write [19], LOT-OutGen [161], and HelloBench [420] have all conducted experiments involving human evaluation or provided human evaluation criteria.
LLM-as-a-Judge
The main drawback of human evaluation lies in its time-consuming, labor-intensive, and inefficient nature. Recently, there has been a growing trend of using strong-performing LLMs to replace humans for fine-grained evaluations [682]. This strategy is also known as LLM-as-a-Judge. In ProxyQA [490], LLMs are used to evaluate whether the responses to proxy questions are correct. In LFMedQA [213], GPT-4o and Claude-3.5 are used for pairwise comparisons. In HelloBench [420], predefined checklists are set for each sub-task, and the LLM determines whether each checklist is satisfied. The overall score is calculated using human-correlated weights.
6.2.4 Discussion
What Kind of Data Sources Are Better?
The data source lays the foundation for the quality of a benchmark. In Section 6.2.2, we categorize the data sources for long-form generation into five types: web-sourced data, user-sourced data, synthetic data, PADs, and CrowdSrc. Web-sourced data is advantageous in terms of scale and accessibility, but it often suffers from low quality. Similarly, while user-sourced data is directly obtained from users, its quality can also vary significantly. Synthetic data has the advantage of making evaluation easier, as it allows for the use of automatic metrics with high evaluation accuracy. However, such data often lacks alignment with real-world scenarios. Previous available datasets pose risks such as data leakage. While CrowdSrc provides high-quality data, it may still deviate from practical use cases. It is clear that each data source has its own limitations. So, what type of data can be considered good for long-form generation? We argue that user-sourced data combined with detailed post-processing is a promising direction for future research. Specifically, the optimization goal of LLMs is to serve users, which makes understanding the real issues users encounter critical. As such, obtaining first-hand interaction data directly from users is ideal. However, user-sourced data often contains low-quality samples, making data filtering a top priority. We believe that human involvement in the data post-processing phase is essential to achieve better outcomes. As long as data quality is ensured, having slightly fewer evaluation samples is unlikely to introduce significant evaluation bias.
7 Analysis
As shown in Figure 9, we provide the performance analysis and model structure analysis to understand neural network models externally and internally. This section provides a detailed review of these works.
7.1 Performance Analysis
First, LCLMs are analyzed as black boxes to examine their behavioral characteristics. In this subsection, we will first dive into the false promise of support context length, related to the well-known lost-in-the-middle phenomenon. Then, we explore the relationship between long context perplexity and real-world performance. We also discuss the ongoing debate between Retrieval-Augmented Generation (RAG) and long context modeling.
7.1.1 The False Promise of Support Context Length
Recent years have witnessed remarkable growth in model context length, expanding from 4K tokens [515] to 128K tokens [155], and even 10M tokens [503]. Despite this impressive scaling of context extension, there exists a significant gap between the context length these models claim to support and the actual context length they can process effectively [319, 190, 256]. A particularly noteworthy phenomenon in this regard is the lost-in-the-middle effect. Liu et al. [319] demonstrate that many LCLMs exhibit a distinctive U-shaped performance curve: performance remains robust when information is located at the beginning or end of the input, but deteriorates substantially when critical information is positioned in the middle. An et al. [11] and He et al. [175] also observed that models progressively lose track of target information as the relative distance increases. To systematically assess the prevalence of this gap between supported and effective context lengths, RULER [190] conducted comprehensive evaluations of more than ten models, including both open source and proprietary ones, as illustrated in Table 9. The findings reveal a consistent pattern: For most models across both categories, the effective context length rarely exceeds half of the claimed length. This discrepancy underscores that, alongside pursuing ever-larger context window sizes, improving model performance within already supported context lengths is equally important. Results on BABILong [256] benchmark also support these evidences.
| Models | OpenSource | Claimed Length | Effective Length | Effective Ratio |
|---|---|---|---|---|
| Llama2 (7B) | ✓ | 4K | - | - |
| Gemini-1.5-Pro | ✗ | 1M | ||
| GPT-4 | ✗ | 128K | 64K | 50% |
| Llama3.1 (70B) | ✓ | 128K | 64K | 50% |
| Qwen2 (72B) | ✓ | 128K | 32K | 25% |
| Command-R-plus (104B) | ✓ | 128K | 32K | 25% |
| GLM4 (9B) | ✓ | 1M | 64K | 6.4% |
| Llama3.1 (8B) | ✓ | 128K | 32K | 25% |
| GradientAI/Llama3 (70B) | ✓ | 1M | 16K | 1.6% |
| Mixtral-8x22B (39B/141B) | ✓ | 64K | 32K | 50% |
| Yi (34B) | ✓ | 200K | 32K | 16% |
| Phi3-medium (14B) | ✓ | 128K | 32K | 25% |
| Mistral-v0.2 (7B) | ✓ | 32K | 16K | 50% |
| LWM (7B) | ✓ | 1M | ||
| DBRX (36B/132B) | ✓ | 32K | 8K | 25% |
| Together (7B) | ✓ | 32K | 4K | 12.5% |
| LongChat (7B) | ✓ | 32K | ||
| LongAlpaca (13B) | ✓ | 32K |
7.1.2 Relevance of Long Context Perplexity and Real-World Performance
Beyond measuring language modeling capabilities, empirical evidence has demonstrated that language models’ perplexity on short texts exhibits strong correlation with their performance on short-text downstream tasks [201]. Specifically, lower perplexity scores on a held-out set of short texts consistently predict superior performance on downstream short-text tasks. However, this correlation becomes substantially weaker in long context scenarios. Hu et al. [194], An et al. [8], and Sun et al. [482] all observed that different models’ perplexity scores on long contexts fail to correlate with their long context comprehension capabilities.
Recent work has reestablished the role of perplexity in evaluating models’ long context modeling capabilities. Through comprehensive experiments, Lu et al. [341] demonstrate that when fine-tuning a single base model (LLaMA2-7B) with various context-extension methods—including PI [60], YaRN [402], NTK [403], LongLora [68], Landmark Attention [371], and CLEX [50]—the resulting models’ perplexity scores on the GovReport [196] dataset exhibit significant correlation with their performance on long context downstream tasks (including Needle-in-a-Haystack, LongBench, and RULER). Concurrently, Fang et al. [121] introduced LongPPL, a refined metric that eliminates interference from context-irrelevant tokens by computing perplexity exclusively on context-sensitive token distributions. Under this improved metric, models’ long context perplexity scores show robust correlation with their long context downstream performance. Together, these investigations reestablish perplexity as an effective indicator of long context modeling capabilities, providing valuable reference for future reliable evaluation of LCLMs.
7.1.3 RAG Meets Long Context LLMs
Since the emergence of LCLMs, they have frequently been compared with Retrieval-Augmented Generation (RAG) in terms of performance. Given a query, the RAG pipeline first retrieves key information from corpora, then uses an LLM to generate answers based on this information, while LCLMs process entire corpora as input, implicitly identifying relevant information before producing answers. Li et al. [298], Lee et al. [264] revealed that when ample computational resources are available, LCLMs deliver superior average performance compared to RAG, despite not being specifically trained for these tasks.
However, compared to RAG, directly employing LCLMs to generate responses based on entire corpora presents significant efficiency limitations. Therefore, instead of comparing RAG against LCLMs, current research has shifted toward combining these approaches to get the best of both worlds. Li et al. [298] proposed the Self-Route method, which dynamically directs queries to either RAG or LCLMs based on the model’s self-assessment, thereby optimizing the balance between performance and computational cost. Jiang et al. [224] leveraged LCLMs to obtain larger, semantically more coherent retrieval units for RAG. Jin et al. [226] discovered that "hard-negative" examples significantly impact LCLM-based RAG, and therefore designed both training-free and training-based approaches to mitigate this challenge.
7.2 Model Structure Analysis
Section 7.1 examines LCLMs as black boxes, discussing the false promise of supported context length, the relevance between long context perplexity and real-world performance, and the ongoing debate between LCLMs and RAG. Taking a step further, this section approaches LCLMs from a glass-box perspective, providing deeper insights at the granularity of individual model components (e.g., positional embeddings, attention and MLP modules, transformer layers), thereby illuminating the internal workings that drive long context capabilities.
7.2.1 Positional Embedding
In long context modeling, the larger the model’s context length is, the more possibilities there are in downstream applications. However, models are typically trained on a small and fixed context length during pretraining. Length extrapolation studies the problem of enabling models to digest longer texts than the training distribution. In this section, we review how position embeddings (specifically RoPE [476]) could be extended for length extrapolation.
RoPE Essentials
RoPE [476] explicitly encodes the relative position between tokens into attention. Recall that for a model with even hidden size , the RoPE embedding [477] for absolute position would be:
| (10) |
The in Equation 10 is the rotation base. The trigonometric functions could be associated with hypothetical “wave lengths” , which are indicative of the model’s context capacity. For a given , the wave lengths range from to [402]. A typical choice for is 10000 [476], yielding max wave length . The hypothetical “frequency” associated with a wave length is . Therefore, the larger the base, the larger the wavelength and the lower the frequency is.
Position Interpolation (PI)
Position interpolation [60] scales positions linearly to enlarge context length. Suppose that the model is pretrained with context length and we wish to extend it to . Let denote the scaling factor. PI maps the original position to a hypothetical position . The largest position would be mapped to . Therefore, all mapped positions still fall within the training range. From the perspective of wavelength, new wavelengths would be . PI enables length extrapolation with minimal fine-tuning steps ().
Frequency-Specific Scaling
Cited works in this paragraph build on an important insight: injecting high frequency embeddings improves performance and convergence [492]. On the contrary, PI scales up wavelengths, which transforms high-frequency embeddings into low-frequency ones. An initial solution named “NTK-aware scaling” [29] starts from unscaled high-frequency embeddings, then gradually transits to scaled low-frequency embeddings. Concretely, . YaRN preserves unscaled high-frequency embeddings more conservatively than NTK, and transits to scaled low-frequency embeddings faster. Figure 10 illustrates the wavelengths of RoPE, PI, NTK, and YaRN.
Critical Rotation Base
Liu et al. [329] investigates the impact of both scaling up and scaling down the rotation base. Their setting is similar to PI, and they calculate critical scaling factors. Suppose that the model is pretrained with context length . Denote as to connect it with trigonometric functions. The critical rotation base has the largest wave length that is smaller than . Let denote the critical dimension index, then . Associated with is the critical rotation base and the critical wave length .
When scaling down the rotation base from to , phase change happens when the largest wave length is equal to . The gains of scaling down the rotation base is prominent until . When scaling up the rotation base from to , would correspond to , which is indicative of the phase change point: model’s perplexity would explode on texts longer than .
Men et al. [358] further scrutinizes scaling rotation bases. They point out that scaling down rotation bases can only achieve superficial long context capabilities. The authors take one more step to derive the lower bound of the rotation base for an expected model context length. The derivation is based on the following theoretical insight: the model’s ability to attend to a similar token decays as the distance increases, but the decay rate is slower for larger bases. Empirically, there is a polynomial relationship between effective context lengths and rotation bases.
7.2.2 Attention and MLP Analysis
Attention Head
Attention heads typically serve specialized purposes. For example, previous research finds induction heads, name mover heads and arithmetic heads in LLMs [385, 532, 660]. Strides have been made in identifying crucial components for long context modeling. Wu et al. [573] identifies “retrieval heads”, which are responsible for extracting information from long contexts. Ablating such heads leads to significant degradation across model families and model sizes. Razor Attention [493] refines retrieval heads into two subsets: echo heads and induction heads. Echo heads attend to identical tokens from the current location, while induction heads attend to the token after the identical token. Fu et al. [130] further points out Retrieval-Reasoning (R2) Heads, which combines retrieval capabilities with reasoning abilities.
The Softmax Function and Attention Patterns
The softmax function poses severe limitations on long context modeling. As sequences grow longer, attention scores become increasingly uniform, thus the model cannot focus effectively [169]. To mitigate this during length extrapolation, scaling coefficients are commonly adopted [402]. Another prominent phenomenon is the attention sink effect [588], where attention heads put heavy scores on the first token. The removal of these tokens from the KV cache can drastically impair model performance. Two solutions have been proposed to address this issue: 1. Introducing a dedicated trainable “Sink Token” to hold excessive attention scores. 2. Implementing alternative attention mechanisms to softmax, such as SoftMax-One [364].
MLP Layers
Voita et al. [522] finds that the activation of certain MLP neurons is highly correlated with the current token’s position. It also reveals that neurons could act as n-gram detectors, capturing local patterns. While the authors inspect only absolute positional embeddings, one could expect that there also exists neurons that activate strongly on certain relative positions.
7.2.3 Layer Interaction
Modern LLMs are composed of a stack of transformer layers each incorporating attention and MLP modules. Interestingly, researchers have discovered that alternating between full attention and linear-complexity mechanisms (such as window attention [605] or lightning attention [367]) across layers yield superior extrapolation performance. Regarding position embedding, Yang et al. [605] further discover that alternating between NoPE [241] and RoPE can get the best of both worlds, as NoPE offers advantages in information retrieval, while RoPE better models local information due to its built-in recency bias.
8 Application
The strong multitasking capabilities enable LLMs to be adapted to a wide range of applications. In real-world scenarios, tasks frequently require the processing of extensive contextual information. Consequently, long context LLMs significantly enhance the practical utility of LLMs in various domains, including GUI copilots and RAG-based systems, as illustrated in Figure 11. In this section, we briefly discuss the applications of long context LLMs and the associated techniques.
8.1 Application in Agent
LLM-based agents complete tasks via iterative interactions with environments, predicting next steps based on previous interaction histories [619, 581, 691]. Since both the environment observations and the interaction trajectories can be very lengthy, long context capability is crucial for developing effective agents.
Long context comprehension capabilities enable LLM agents to process complex agent tasks with extended observations. One example is GUI agent task [193], where the agents are required to comprehend the rich layout and text information [688, 316, 590]. Another example is software engineering agent [225]. The agents are asked to interact with a repository to solve real-world coding tasks [610, 665, 582, 549]. Some agent tasks inherently require long-horizon reasoning and planning capabilities. For example, gaming agents must track the game state and plan actions over an extended horizon to progress or win [491]. Tasks like planning multi-day travel itineraries [47] or solving complex machine learning problems [43, 197] also necessitate long-horizon planning. Automated agent optimization [702, 692] also requires good long context understanding and generation capabilities so that the LLM-based agent optimizer can effectively reason with long-horizon agentic workflows and intermediate results and generate optimized prompts, tools, and agentic workflows.
The long-context capabilities of large language models have facilitated the development of various agent applications. Open-source LLM agent development platforms, such as Dify [502] and Coze [501], enable users to easily orchestrate LLM apps ranging from simple agents to complex AI workflows. General agents, like the OpenAI Computer-Using Agent [509] and Manus [508], function as comprehensive AI assistants that handle real-world tasks by performing actions such as web browsing and coding within a virtual PC environment.
8.2 Application in RAG
Integrating long context technology into Retrieval-Augmented Generation (RAG) systems significantly enhances performance by enabling the processing of larger text chunks, retrieving more relevant information, and supporting the development of complex systems to address complex queries [631, 226, 695]. For instance, LongRAG [223], which combines a ‘long retriever’ and a ‘long reader’ demonstrates notable improvements in document question answering. Similarly, studies [226, 457] show that models capable of retrieving longer text fragments significantly enhance answer relevance and completeness. Furthermore, Li et al. introduces ‘Reasoning with Attributions’ which leverages long context models to improve multi-hop reasoning benchmarks by providing a larger context window for complex prompts. These advancements highlight how long context models reduce traditional RAG systems’ reliance on external tools, offering a robust end-to-end modeling approach that enhances system performance and robustness.
Due to the aforementioned benefits, the rapid development of long context technology has spurred the growth of RAG systems, leading to popular applications like Perplexity [261] and Genspark [145], which focus on retrieval. Other systems, such as ChatGPT [484] and Deepseek [97], have also integrated retrieval capabilities. Notably, Deepsearch [436], developed by xAI, enhances information navigation through advanced context understanding and intent recognition. These innovations underscore the critical role of long context technology in modern retrieval systems.
8.3 Application in Chatbot
Recent advancements in long context processing have significantly enhanced dialogue systems by enabling extended memory retention and contextual coherence. Long context windows allow chatbots to process extensive conversational histories, thereby improving interaction fluency and supporting long-term memory capabilities. This technological leap is foundational for applications requiring sustained user engagement, as evidenced by frameworks exploring prompt-based memorization [263], memory-augmented architectures [685], and context extension techniques [546, 548].
Due to the aforementioned benefits, long context processing technology has given rise to a diverse array of AI dialogue systems, demonstrating its broad value in practical applications. Major platforms like ChatGPT [387] and Pi [205] utilize persistent memory to maintain user preferences and conversation history, enabling personalized interactions. Specialized systems such as Character AI [46] and Talkie [4] further exemplify how long context windows support style-consistent dialogues and contextual continuity. These capabilities prove particularly valuable in longitudinal applications including educational tutoring, healthcare monitoring, and therapeutic counseling, where preserving the context over multiple conversations is critical [230].
8.4 Application in Code
The advancement of long context technology has significantly enhanced repository-level code tasks and software development agent tasks [221]. Such tasks often require processing complex and extensive contextual information, which previously constrained models’ ability to integrate comprehensive context. For instance, RepoCoder [642] employs a similarity-based retrieval mechanism to enrich context and improve code completion quality. Similarly, the RLPG framework [463] integrates repository structures with relevant file contexts to generate repository-level prompts. These intricate system designs were necessitated by the limitations of earlier context windows. However, breakthroughs in long context technology have effectively alleviated these constraints, enabling the development of more sophisticated systems that enhance task execution precision and efficiency [462].
Recent models incorporating long context technologies, such as StarCoder2 [337], Qwen2.5-Coder [203], and Granite Code Models [368], have demonstrated superior performance in long context code tasks. Unlike earlier approaches that relied on complex architectures to manage extended contexts, these models leverage robust long context comprehension capabilities, providing scalable and practical solutions for software development. This progress has streamlined tasks such as code completion, contextual understanding, and repository-level code generation.
Due to these advancements, long context technologies have spurred the development of advanced AI-powered code applications, such as GitHub Copilot [147] and Anysphere Cursor [13]. These tools utilize long context models to enhance code completion, deliver contextual documentation, and enable predictive debugging. By maintaining a coherent understanding of large codebases, they improve developer productivity, reduce manual effort, and support more intuitive workflows. This integration highlights the transformative impact of long context technology on modern software development.
8.5 Application in Traditional NLP Tasks
The introduction of long context technology has led to transformative breakthroughs in numerous traditional NLP tasks by addressing the limitations of conventional methods, which were constrained by restricted context windows. This technological advancement has significantly enhanced the performance and practical applicability of various NLP applications. In this section, we briefly discuss three representative tasks that have particularly benefited from long context technology.
Document Summarization
Traditional document summarization methods often encounter challenges such as inconsistencies and limited contextual understanding [662, 647]. The development of long context models enables the processing of entire documents at once, facilitating a more comprehensive understanding of the original content and improved identification of redundant information [638, 545, 151]. Models such as Longformer [25] and LongT5 [167] have demonstrated exceptional performance in document summarization tasks, thereby advancing the practical implementation of applications such as summarizing news articles and academic papers [227].
Information Retrieval
Traditionally, most vector models were limited by window size, which required segmenting the data into blocks when performing long context semantic modeling, often resulting in the loss of coherent semantic information [701, 535]. However, with advancements in long context technology, semantic vector models can now accommodate longer text inputs, such as text-embedding-3-large [388], jina-embeddings-v2 [165], and BGE-M3 [55]. This enables the processing of longer texts such as chapters and documents, thereby significantly improving the practical usability of semantic vector models in real-world applications [696, 438].
Machine Translation
Document translation is a key research area in machine translation. Early approaches focused on modifying the transformer architecture to encode more contextual information [362, 644, 22, 539]. Long context models, however, can directly translate lengthy, complex documents by processing extended context windows, which improves the translation of polysemous words [182, 538]. This advancement significantly enhances the translation quality of long documents and makes it increasingly feasible for large language models to translate entire novels and books [345].
8.6 Application in Multimodal Tasks
Understanding extensive videos, large collections of images, audio streams, and lengthy text inputs is often essential in real-world scenarios. Therefore, multimodal long context modeling has become a key area of research in long-text applications. This section provides an overview of relevant data and training strategies, models, and frameworks, as well as benchmarks for long context multimodal large language models (MLLMs).
Data and Training Strategies
To extend the context windows of MLLMs, many studies design the data curation pipeline to filter and synthetic long context multimodal training data. Typically, these datasets, unlike textual long context training data, are constructed by increasing the length of the multimodal part in the context, such as multi-image [626], long video [112, 291]. Leveraging such data, several studies [676, 275, 547, 172, 652, 602, 516] enhance MLLMs’ long context capabilities by training on progressively longer multimodal contexts. After that, some work [286] utilizes the variants of preference optimization to improve the long context modeling of MLLMs. Alternatively, some work utilizes long context LLMs as the foundational model of MLLMs for training [212] to inherent long context modeling ability of LLMs.
Model Structure and Framework
To enhance the ability of MLLMs to understand multimodal long context input and reduce the computational costs in model training and inference, some work focuses on modifying position embeddings and introducing emergent modules in MLLMs for better inference efficiency and performance. Next, we will elaborate on the details of these techniques. Unlike text-only long context language modeling, to effectively model the positional information of visual tokens in multimodal long context inputs, some studies [541, 139, 479] propose extending the dimensionality of the ROPE adopted by numerous MLLMs. The dimensional extension enables ROPE can improve the sequential modeling in multimodal tokens, the spatial modeling in images, and the temporal modeling between video frames, thereby improving the differentiating the positional information of visual tokens in multimodal long context inputs. In addition to enhancing the ability of multimodal models to capture positional information, some studies introduce specialized modules to further reduce the context window length occupied by visual tokens with MLP [541], pixel shuffle [70], Q-former-like module [7, 282, 700, 621], LoRA [346], which integrate effective important visual information into LLMs eliminating redundant information in visual representations.
However, the aforementioned methods to reduce the length of visual tokens necessitate training MLLMs from scratch for adaptation. To compress the number of visual tokens to reduce inference costs for well-trained MLLMs, some approaches [324, 171, 613, 517] in a training-free manner preserve important visual tokens by assessing their relevance with input text. Generally, for multimodal long context inputs, videos occupy the largest portion of the context window due to containing numerous frames. Therefore, some work utilizes tree structure [554], reward models [616], similar scores based on CLIP [302], trained video frame selector [630, 172], and aggregating methods [124] to select keyframes and decrease the length of video in context.
Benchmarks
After introducing the basic and advanced development of long context MLLMs in the community, in this part, we will review existing evaluation benchmarks for assessing the performance of multimodal long context modeling capabilities of MLLMs. Multimodal long context benchmarks can primarily be divided into two types: those that use multiple images and those that use long videos as the context. These benchmarks then require the model to answer questions based on the contextual information to evaluate the MLLMs’ capability of multimodal long context modeling. For benchmarks using multi-image context, some works [350, 409, 77] use a large number of multimodal cases as context to evaluate the model’s many-shot in-context learning capabilities. Other works employ needle in a haystack [530], temporal, and semantic multi-image tasks [467] as the primary evaluation methods. Additionally, some studies [222, 451, 435] not only assess the understanding of long multimodal contexts but also evaluate the multiple document comprehension capabilities. Taking this further, certain attempts aim for a comprehensive evaluation by integrating multiple task formats. MMLongBench [553], for example, covers multimodal needle-in-a-haystack (NIAH), long-document VQA (DocVQA), visual retrieval-augmented generation (VRAG), and many-shot in-context learning (ICL). Compared to multi-image long context data, understanding long videos is more challenging due to their larger context length and the inclusion of more redundant and noisy information. Some work [687, 703, 44, 144] utilizes diverse long video and multiple challenging tasks to evaluate multimodal long context modeling of MLLMs. Other works [377, 112, 568] collect videos with rich events through both automated and manual methods and pose questions on the events.
8.7 Application in Specific Domains
Long context technology has demonstrated significant potential across various domains by enabling more efficient processing of complex and lengthy information [151]. In news, it improves the generation of coherent summaries by aggregating data from multiple sources [135]. In the legal field, it simplifies the interpretation of large volumes of documents, helping professionals quickly extract key insights [238]. In healthcare, long context models enhance the synthesis of patient records and medical literature, thereby supporting informed decision-making [120]. Financial applications utilize these models to analyze extensive reports and derive insights into market trends [427, 356, 382]. In the field of biology, long context technology aids in understanding molecular structures and genomic sequences, fostering advancements in drug discovery and personalized medicine [183, 448]. Overall, long context models have significantly enhanced the effectiveness and accuracy of information processing in these areas, making data synthesis and information extraction more efficient.
9 Future Directions
9.1 Long Context Modeling for o1-like Long Reasoning
Most recently, o1-like long reasoning models have attracted significant attention due to their exceptional performance on complex reasoning tasks [414, 202, 667, 679, 166, 506, 374, 56]. This test-time scaling paradigm that first generates extended CoT reasoning before producing answers essentially equips models with the ability to perform trial-and-error, backtracking, correction, and iteration auto-regressively within the context window, unlocking significant performance improvements [276, 531, 295]. Despite its promise, current practices leveraging LongCoT remain far from satisfactory, primarily due to two critical drawbacks: the rough quality of generated CoTs severely impacts reasoning efficiency, containing substantial redundancy and irrelevant information [648, 583, 63, 192, 348]; and the difficulty in scaling CoT length significantly constrains the potential for further performance gains, as numerous studies have observed performance degradation in particularly long reasoning chains [640, 614, 578].
Addressing these challenges requires advances in long context language models, which are essential for two key aspects: reliable evaluation of long reasoning processes (currently a significant challenge for existing Process Reward Models [178]), and developing robust long-form generation capabilities for producing longer and more reliable reasoning chains. Furthermore, tailoring efficiency-oriented techniques developed for general long context scenarios, such as KV cache compression and prompt compression, to the specific needs of long reasoning models presents a promising direction for future research.
9.2 Further Extending Context Window and Improving Modeling Capabilities
Context length stands as one of the most fundamental attributes of language models. Its evolution closely tracks the development of increasingly sophisticated modeling capabilities - from basic n-gram models constrained to mere tokens of context [36], to BERT-style architectures processing hundreds of tokens for paragraph-level understanding [101], to early iterations of ChatGPT managing 2k-4k tokens for general-purpose dialogue, and now to unprecedented scales of 100k to 1M tokens which has enabled sophisticated capabilities including long chain-of-thought reasoning [166], long in-context learning [503], long video processing [511], and supporting complex agent systems with extensive interaction histories [510]. This progression demonstrates how expanding context length has consistently unlocked new frontiers in language modeling, enabling increasingly sophisticated applications and use cases. Therefore, extending context windows to even greater scales holds the promise of unleashing more advanced capabilities and transformative applications. On the other hand, existing research has demonstrated a significant gap between models’ claimed supporting context length and their effective context length [190, 10]. Consequently, enhancing models’ long context modeling capabilities within their supported context lengths remains crucial. Regarding the expansion of context windows and improvement of long context modeling capabilities within supported context windows, we have identified several promising directions:
Long Context Reinforcement Learning
Despite its immense potential, reinforcement learning remains underexplored in long context scenarios. While combining LongCoT with RL has demonstrated significant improvements for tasks with definitive answers, many long context applications still face fundamental challenges as they require referring to lengthy inputs. One example is alignment scenarios, where long context RLHF practices—whether employing long context models as reward models (e.g., GLM-Long [148]) or utilizing long context preference data (e.g., LLaMA-3.1 [155])—have yet to yield substantial benefits. The core challenge of long context RL lies in developing reward models capable of effectively evaluating extensive inputs, such as lengthy reasoning chains, narrations, and dialogues. Oriented toward this goal, collecting long context preference data, either through human annotation or carefully designed synthesis protocols, merits further investigation.
Recipe for Collecting, Filtering and Synthesizing High-Quality Training Data
The advancement in long context modeling capabilities is fundamentally data-driven. The data recipe for training long context models presents several promising directions for future exploration: (1) developing fine-grained filtering strategies beyond heuristics to identify training data with long-range dependencies; (2) synthesizing challenging queries that require integrating key information dispersed throughout the text, along with their correct answers; (3) exploring task types particularly suited for long context RL training that best generalize to other long context tasks; and (4) optimizing the distribution of domains and sequence lengths to achieve Pareto efficiency between computational cost and model performance. Addressing these challenges will be essential for developing more efficient and effective data recipes for future LCLMs.
Long Context Distillation
Model distillation is a common strategy to enhance the capabilities of smaller models by leveraging larger, more powerful models. The de facto approach involves generating responses from a strong model for a set of queries, then fine-tuning the smaller model on these question-answer pairs. This method has proven effective in various aspects, including improving human preference ratings for model responses and enhancing models’ chain-of-thought reasoning abilities. Within the long context domain, an interesting research question emerges: how can we utilize large models with strong long context modeling capabilities to improve models with weaker long context abilities? Beyond generating high-quality responses [16], an intriguing observation is that powerful LCLMs can effectively identify and filter training data that exhibits strong long-range dependencies, with more capable models demonstrating superior filtering efficacy [569]. Given that LCLM training is a complex process spanning both pre-training and post-training stages, we believe that models with strong long context modeling capabilities can play a more significant role in the LCLM training process, improving both training efficiency and resulting model performance.
Performance-Oriented Architecture Design
Architectural design remains an ongoing research topic in long context modeling. Beyond improving training and deployment efficiency, architectural modifications such as enhanced positional encodings and hybrid attention mechanisms can lead to better extrapolation capabilities and improved modeling within supported context lengths, as discussed in Section 3. We anticipate continued advances in this direction to further enhance LCLMs’ modeling capabilities.
Optimizing Long-Form Generation
Current research on LCLMs predominantly focuses on processing long inputs, such as information retrieval from extensive documents or concise summary generation. By contrast, long-form generation remains relatively unexplored, despite its promising applications in areas such as long-form narrative creation, repository-scale code generation, and long CoT. Advancing long-form generation capabilities presents two significant challenges: First, beyond context comprehension, the automated generation of high-quality long-form content demands sophisticated output planning, requiring a higher level of language modeling capabilities. Second, the evaluation of generated long-form content poses substantial difficulties - automated metrics like ROUGE demonstrate limited reliability for lengthy texts, while manual assessment proves prohibitively time-consuming. Consequently, future advances in long-form generation may need to develop in tandem with improvements in automated evaluation methodologies for long-form content.
Domain-Specific Enhancement
As mentioned above, the expansion of context windows has unlocked diverse application domains for language models, ranging from text-intensive fields such as legal and medical domains to multimodal scenarios where vision-language models process extensive visual content, and to intelligent systems maintaining rich interaction histories. While preserving robust general-purpose long context modeling capabilities remains essential, investigating targeted optimizations for these domain-specific challenges presents a promising research direction.
9.3 Efficient Architecture Design, Training, and Deployment of LCLMs
Model Architecture
The inherent limitations of Transformer models become pronounced in long context scenarios, primarily due to the substantial KV-cache memory overhead. The memory significantly exceeds the High Bandwidth Memory (HBM) capacity of contemporary GPUs. Consequently, the exploration of memory-efficient KV-cache architectures, such as the investigation of linear attention mechanisms, emerges as critical directions for the architectural advancement of Long Context Language Models.
Training and Inference Frameworks
To mitigate training complexities, the implementation of refined partitioning strategies [411] and local recomputation techniques [249] assumes paramount importance. These methodologies which balance bandwidth overhead with computation time are crucial to effectively address the growing divergence between increasingly complex model architectures and the continuously evolving capabilities of GPU. For inference frameworks, the strategic deployment of operator fusion and the rearrangement of computational sequences to curtail the generation of extensive intermediate matrices remains a salient avenue for investigation [93, 94, 444]. Despite prevailing precision norms anchored at 16-bit, state-of-the-art hardware architectures already accommodate high-throughput computation at reduced precisions, down to 8-bit [384]. The application of 8-bit quantization to selectively chosen modules within models, applicable to both training and inference paradigms, has demonstrated considerable promise [310]. Prospective research endeavors focused on exploring even lower precision quantization levels, and the expanded application of quantization across a broader spectrum of model modules, are anticipated to yield substantial performance enhancements. Recently, the advent of long context Reinforcement Learning (RL) training [166] introduces novel challenges to existing frameworks, necessitating targeted optimizations to bolster training efficiency and stability.
Customized Hardware Design
The rapid improvement in hardware computational speed has surpassed the corresponding gains in bandwidth, thereby exacerbating bandwidth bottlenecks, particularly during the decoding phase [146]. While existing Prefill-Decoding disaggregated architectures facilitate the independent optimization of prefill and decoding stages, there remains a notable absence of specialized hardware designed for decoding. Decoding processes are inherently characterized by substantial demands for GPU with more HBM capacity and higher bandwidth, while exhibiting comparatively lower computational intensity. Therefore, the development of dedicated hardware specifically engineered for decoding, characterized by enhanced HBM capacity and bandwidth, constitutes a crucial direction for future hardware evolution in this domain.
9.4 More Reliable Evaluation Framework for Long Context Language Modeling
As discussed in Section 6, the capabilities of long context language modeling can be categorized into two main aspects: long context comprehension and long-form generation. Consequently, future research directions naturally align with these two fundamental tracks.
Towards Real-World and Scenario-Specific Long Context Comprehension
Regarding long context comprehension, given that numerous synthetic and real-world benchmarks have emerged to evaluate various aspects of this capability, future research can be directed towards more specific real-world applications. This includes mining user logs to understand authentic long context usage patterns, assessing LCLM performance across specialized domains (such as legal, medical, and financial sectors), and evaluating its effectiveness in different academic disciplines (from social sciences to natural sciences), etc. Notably, the extensive input lengths pose significant challenges for obtaining high-quality human annotations. Therefore, developing efficient annotation frameworks specifically designed for long context scenarios presents another valuable research direction.
Coarse-to-Fine Evaluation of Long-Form Generation
In the field of long-form generation, human evaluation is frequently used, mainly because automatic metrics struggle to effectively evaluate long responses and are less suited to open-ended generation tasks. Human evaluation and automatic metrics are two extremes: automatic metrics are highly efficient but lack precision, while human evaluation offers high accuracy but is significantly resource-intensive. How can we combine the advantages of both? By observing the trends of evaluation methods for long-form generation, we can notice a transition from a combination of automatic metrics and human evaluation toward the adoption of LLM-as-a-Judge. Nonetheless, fully end-to-end evaluation of long responses remains a challenge for current LLMs. To address this, an evaluation workflow can be designed, decomposing the entire evaluation into granular aspects, following a systematic coarse-to-fine adaptation. For simpler evaluation aspects, LLMs combined with prompt engineering can serve as alternatives to human evaluators. For components where LLMs struggle to evaluate, further decomposition of the evaluation workflow or adopting proxy-based methodologies can be explored. This systematic breakdown allows us to preserve high evaluation accuracy while enhancing efficiency, ultimately demystifying the challenges tied to long-form generation evaluation. Currently, ProxyQA [490], HelloBench [420], and LongFact [556] reflect this trend, but we believe there is still potential for optimizing these systems further to achieve even higher accuracy.
9.5 Towards Mechanistical Interpretability for Long Context Modeling
Mechanistic Interpretability (MI) [379] aims to reverse engineer models at a module level. In MI literature [359, 660, 532], researchers typically pinpoint a sparse set of attention heads and MLPs that are responsible for some downstream task. One exemplar of MI for long context modeling is the identification of retrieval heads [573] that are tied to long-range dependencies. MI for long context modeling is an exciting intersection for both worlds. We point out several promising research questions to answer.
Mechanistic Understanding of Position Embeddings
How do LLMs make use of positional embeddings? Voita et al. [522] showcases that the activation weights of certain neurons are highly correlated with the current token’s position, yet they analyze only absolute positional embeddings. Future works could shed light on whether the same holds for relative positional embeddings, and on the interaction between MLPs and attention modules when processing positional information.
Identifying Causes of Long Context Issues
We advocate a problem-driven approach to MI for long context modeling. For example, Liu et al. [319] points out that models have a positional bias for processing information, favoring tokens at the start or at the end. We take one step further and ask: What modules of the model lead to such a bias? Based on possible discoveries, can we devise a method to mitigate it mechanistically?
Interpretability-Driven Enhancements
Closely related is the problem of length extrapolation. Zhou et al. [694] demonstrates that LLMs fail to align digits when performing addition on numbers longer than those in the training distribution. Similarly, we ask: What modules of the model are responsible for this failure? Can we build on the findings to improve length extrapolation? At a high level, MI provides useful toolchains to understand the inner workings of LLMs and to pinpoint problematic components. On the other hand, long context modeling is a challenging field with its unique interests and a huge application space. MI for long context has huge potential for efficiently identifying and addressing issues in long context modeling.
10 Conclusion
In this paper, we provide a comprehensive survey on the recent advances on long context modeling for large language models. Specifically, we first discuss the long context data strategy including data filtering, data mixture and data construction strategies for both pre-training and post-training stages. Then, we provide a comprehensive discussion of the recent advancement on model including Transformer-based LLM architectures and position embeddings, which aim at enhancing the long context capabilities of LLMs. After that, we provide the workflow-based LCLM methods, such as prompt compression and agent-based methods, to enhance the long context abilities. Besides, we discuss the long context evaluation benchmarks including understanding and generation abilities. Moreover, we provide the AI infrastructure method including training and inference strategies optimized for long context modeling. In addition, we also provide a detailed analysis for better interpretability of LCLMs. Furthermore, we summarize existing applications (e.g., agent, RAG, Code) on long context modeling, and discuss the remaining issues or challenges for future directions. Finally, we hope our survey could guide the developers to better understand the related techniques for LCLMs and facilitate the growth of foundation models.
11 Contributions and Acknowledgments
Project Leaders
- •
Jiaheng Liu, Nanjing University, Institute of Automation, Chinese Academy of Sciences, M-A-P, Organize the whole project
- •
Dawei Zhu, Peking University, Organize the whole project
Core Contributors (Alphabet Order)
- •
Zhiqi Bai, Alibaba Group, Architecture
- •
Yancheng He, Alibaba Group, Application
- •
Huanxuan Liao, Institute of Automation, Chinese Academy of Sciences, Data
- •
Haoran Que, M-A-P, Evaluation
- •
Zekun Wang, Kuaishou Technology, Workflow Design
- •
Chenchen Zhang, Tencent, Analysis
- •
Ge Zhang, ByteDance, M-A-P, Architecture & Evaluation
- •
Jiebin Zhang, Peking University, Infrastructure
- •
Yuanxing Zhang, Kuaishou Technology, Infrastructure
Contributors (Alphabet Order)
- •
Zhuo Chen, Alibaba Group, Architecture
- •
Hangyu Guo, M-A-P, Application
- •
Shilong Li, Alibaba Group, Application
- •
Ziqiang Liu, Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences, Workflow Design
- •
Yong Shan, ByteDance, Architecture
- •
Yifan Song, Peking University, Application
- •
Jiayi Tian, Alibaba Group, Data
- •
Wenhao Wu, Peking University, Future Directions
- •
Zhejian Zhou, University of Southern California, Analysis
- •
Ruijie Zhu, UC Santa Cruz, Architecture
Sponsor Committee (Alphabet Order)
- •
Junlan Feng, China Mobile Research Institute
- •
Yang Gao, Nanjing University
- •
Shizhu He, Institute of Automation, Chinese Academy of Sciences
- •
Zhoujun Li, Shenzhen Intelligent Strong Technology
- •
Tianyu Liu, M-A-P
- •
Fanyu Meng, China Mobile Research Institute
- •
Wenbo Su, Alibaba Group
- •
Yingshui Tan, Alibaba Group
- •
Zili Wang, Independent Researcher
- •
Jian Yang, Alibaba Group
- •
Wei Ye, Peking University
- •
Bo Zheng, Alibaba Group
- •
Wangchunshu Zhou, OPPO, M-A-P
Corresponding Authors
- •
Jiaheng Liu, Nanjing University, Institute of Automation, Chinese Academy of Sciences, M-A-P
- •
Dawei Zhu, Peking University
- •
Wenhao Huang, ByteDance, M-A-P
- •
Sujian Li, Peking University
- •
Zhaoxiang Zhang, Institute of Automation, Chinese Academy of Sciences
References
- [1] (2023) SemDeDup: data-efficient learning at web-scale through semantic deduplication. CoRR abs/2303.09540. External Links: Document, 2303.09540, Link Cited by: §2.1.1.
- [2] (2024) LongHealth: a question answering benchmark with long clinical documents. arXiv preprint arXiv:2401.14490. Cited by: Table 6.
- [3] (2024) Evaluating multilingual long-context models for retrieval and reasoning. In Proceedings of the Fourth Workshop on Multilingual Representation Learning (MRL 2024), pp. 216–231. Cited by: Table 6.
- [4] (2024) Talkie | ai-native character community. External Links: Link Cited by: §8.3.
- [5] (2023) GQA: training generalized multi-query transformer models from multi-head checkpoints. In EMNLP, pp. 4895–4901. Cited by: §3.2.1.
- [6] (2023) Position interpolation improves alibi extrapolation. arXiv preprint arXiv:2310.13017. Cited by: 2nd item.
- [7] (2022) Flamingo: a visual language model for few-shot learning. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 - December 9, 2022, S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (Eds.), External Links: Link Cited by: §8.6.
- [8] (2023) L-eval: instituting standardized evaluation for long context language models. arXiv preprint arXiv:2307.11088. Cited by: Table 7, §7.1.2.
- [9] (2024) Training-free long-context scaling of large language models. arXiv preprint arXiv:2402.17463. Cited by: 1st item, Table 4.
- [10] (2024) Why does the effective context length of llms fall short?. arXiv preprint arXiv:2410.18745. Cited by: 1st item, Table 4, §9.2.
- [11] (2024) Make your LLM fully utilize the context. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, External Links: Link Cited by: §2.2.2, Table 2, §7.1.1.
- [12] Introducing contextual retrieval. Note: https://www.anthropic.com/news/contextual-retrieval Cited by: §4.3.
- [13] (2025) Cursor - the ai code editor. Note: https://www.cursor.com/en External Links: Link Cited by: §8.4.
- [14] (2024) Simple linear attention language models balance the recall-throughput tradeoff. External Links: 2402.18668, Link Cited by: §3.2.2.
- [15] (2024) Longalign: a recipe for long context alignment of large language models. arXiv preprint arXiv:2401.18058. Cited by: §5.1.1.
- [16] (2024) LongAlign: a recipe for long context alignment of large language models. In Findings of the Association for Computational Linguistics: EMNLP 2024, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), Miami, Florida, USA, pp. 1376–1395. External Links: Document, Link Cited by: Table 2, §9.2.
- [17] (2023) Longbench: a bilingual, multitask benchmark for long context understanding. arXiv preprint arXiv:2308.14508. Cited by: 2nd item, 1st item, Table 7.
- [18] (2024) LongBench v2: towards deeper understanding and reasoning on realistic long-context multitasks. arXiv preprint arXiv:2412.15204. Cited by: Table 7.
- [19] (2024) LongWriter: unleashing 10,000+ word generation from long context llms. arXiv preprint arXiv:2408.07055. Cited by: Table 2, 2nd item, §6.2.1, §6.2.3, §6.2, Table 8.
- [20] (2020) PipeSwitch: fast pipelined context switching for deep learning applications. In 14th USENIX Symposium on Operating Systems Design and Implementation (OSDI 20), pp. 499–514. Cited by: §5.2.4.
- [21] (2005) METEOR: an automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pp. 65–72. Cited by: 1st item.
- [22] (2021) G-transformer for document-level machine translation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing, ACL/IJCNLP 2021, (Volume 1: Long Papers), Virtual Event, August 1-6, 2021, C. Zong, F. Xia, W. Li, and R. Navigli (Eds.), pp. 3442–3455. External Links: Link, Document Cited by: §8.5.
- [23] (2025) Atlas: learning to optimally memorize the context at test time. arXiv preprint arXiv:2505.23735. Cited by: §3.2.2.
- [24] (2024) Titans: learning to memorize at test time. arXiv preprint arXiv:2501.00663. Cited by: §3.2.2.
- [25] (2020) Longformer: the long-document transformer. CoRR abs/2004.05150. External Links: Link, 2004.05150 Cited by: 1st item, §3.2.1, §8.5.
- [26] (2024) DeciMamba: exploring the length extrapolation potential of mamba. External Links: 2406.14528, Link Cited by: §3.2.2.
- [27] (2024) In-context learning with long-context models: an in-depth exploration. arXiv preprint arXiv:2405.00200. Cited by: 5th item.
- [28] (2025) Bayesian attention mechanism: a probabilistic framework for positional encoding and context length extrapolation. arXiv preprint arXiv:2505.22842. Cited by: 2nd item, Table 3.
- [29] (2023) NTK-Aware Scaled RoPE allows LLaMA models to have extended (8k+) context size without any fine-tuning and minimal perplexity degradation.. External Links: Link Cited by: §7.2.1.
- [30] (2024) Long code arena: a set of benchmarks for long-context code models. arXiv preprint arXiv:2406.11612. Cited by: 6th item, Table 7.
- [31] (2021) Improving language models by retrieving from trillions of tokens. International Conference on Machine Learning. Cited by: §4.3.
- [32] (2018) Discourse-aware neural rewards for coherent text generation. arXiv preprint arXiv:1805.03766. Cited by: §6.2.
- [33] (2024) RecurrentGemma: moving past transformers for efficient open language models. CoRR abs/2404.07839. Cited by: §3.2.3.
- [34] (2024) Model parallelism on distributed infrastructure: a literature review from theory to llm case-studies. arXiv preprint arXiv:2403.03699. Cited by: §5.1.
- [35] (2023) Striped attention: faster ring attention for causal transformers. arXiv preprint arXiv:2311.09431. Cited by: §5.1.2.
- [36] (2007) Large language models in machine translation. In Proceedings of the 2007 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning (EMNLP-CoNLL), pp. 858–867. Cited by: §1, §9.2.
- [37] (2020) Language models are few-shot learners. In Proceedings of the 34th International Conference on Neural Information Processing Systems, NIPS ’20, Red Hook, NY, USA. External Links: ISBN 9781713829546 Cited by: §1, §2.1.2, 2nd item, §3.2.1.
- [38] (2023) Scaling transformer to 1m tokens and beyond with RMT. CoRR abs/2304.11062. Cited by: §3.2.1.
- [39] (2024) MEDUSA: simple llm inference acceleration framework with multiple decoding heads. In Proceedings of the 41st International Conference on Machine Learning, pp. 5209–5235. Cited by: §5.2.5.
- [40] (2024) PyramidKV: dynamic kv cache compression based on pyramidal information funneling. External Links: 2406.02069, Link Cited by: 3rd item.
- [41] (2024) Instruction mining: instruction data selection for tuning large language models. In First Conference on Language Modeling, Cited by: §2.2.1.
- [42] (2024) McEval: massively multilingual code evaluation. arXiv preprint arXiv:2406.07436. Cited by: §1.
- [43] (2024) MLE-bench: evaluating machine learning agents on machine learning engineering. CoRR abs/2410.07095. External Links: Link, Document, 2410.07095 Cited by: §8.1.
- [44] (2024) HourVideo: 1-hour video-language understanding. CoRR abs/2411.04998. External Links: Document, 2411.04998, Link Cited by: §8.6.
- [45] (2024) FLUX: fast software-based communication overlap on gpus through kernel fusion. arXiv preprint arXiv:2406.06858. Cited by: §5.1.3.
- [46] (2023) Character ai. Note: Retrieved September 14, 2023 from https://character.ai/ External Links: Link Cited by: §3.2.3, §8.3.
- [47] (2024) TravelAgent: an AI assistant for personalized travel planning. CoRR abs/2409.08069. External Links: Link, Document, 2409.08069 Cited by: §8.1.
- [48] (2017) Reading Wikipedia to answer open-domain questions. In Association for Computational Linguistics (ACL), Cited by: §4.3.
- [49] (2023) Clex: continuous length extrapolation for large language models. arXiv preprint arXiv:2310.16450. Cited by: Table 4.
- [50] (2024) CLEX: continuous length extrapolation for large language models. In The Twelfth International Conference on Learning Representations, Cited by: §7.1.2.
- [51] (2023) Walking down the memory maze: beyond context limit through interactive reading. arXiv preprint arXiv: 2310.05029. Cited by: §4.4.
- [52] (2024) Magicdec: breaking the latency-throughput tradeoff for long context generation with speculative decoding. arXiv preprint arXiv:2408.11049. Cited by: §5.2.5.
- [53] (2024) FinTextQA: a dataset for long-form financial question answering. arXiv preprint arXiv:2405.09980. Cited by: Table 7.
- [54] (2025) LADM: long-context training data selection with attention-based dependency measurement for llms. External Links: Link Cited by: §2.2.1.
- [55] (2024) BGE m3-embedding: multi-lingual, multi-functionality, multi-granularity text embeddings through self-knowledge distillation. CoRR abs/2402.03216. External Links: Link, Document, 2402.03216 Cited by: §4.3, §8.5.
- [56] (2025) R1-v: reinforcing super generalization ability in vision-language models with less than $3. Note: https://github.com/Deep-Agent/R1-VAccessed: 2025-02-02 Cited by: §9.1.
- [57] (2024) AlpaGasus: training a better alpaca with fewer data. In The Twelfth International Conference on Learning Representations, Cited by: §2.2.1.
- [58] (2024) Long context is not long at all: a prospector of long-dependency data for large language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), L. Ku, A. Martins, and V. Srikumar (Eds.), Bangkok, Thailand, pp. 8222–8234. External Links: Document, Link Cited by: §2.1.1, §5.1.1.
- [59] (2022) SummScreen: a dataset for abstractive screenplay summarization. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 8602–8615. Cited by: 2nd item.
- [60] (2023) Extending context window of large language models via positional interpolation. arXiv preprint arXiv:2306.15595. Cited by: 2nd item, Table 4, §6.1.1, §7.1.2, §7.2.1.
- [61] (1999) An empirical study of smoothing techniques for language modeling. Computer Speech & Language 13 (4), pp. 359–394. Cited by: §1.
- [62] (2024) Generative adapter: contextualizing language models in parameters with a single forward pass. arXiv preprint arXiv: 2411.05877. Cited by: §4.2.
- [63] (2024) Do not think that much for 2+ 3=? on the overthinking of o1-like llms. arXiv preprint arXiv:2412.21187. Cited by: §9.1.
- [64] (2024) Stuffed mamba: state collapse and state capacity of rnn-based long-context modeling. arXiv preprint arXiv:2410.07145. Cited by: §3.2.3.
- [65] (2024) Stuffed mamba: state collapse and state capacity of rnn-based long-context modeling. External Links: 2410.07145, Link Cited by: §3.2.2.
- [66] (2023) Fortify the shortest stave in attention: enhancing context awareness of large language models for effective tool use. arXiv preprint arXiv:2312.04455. Cited by: 2nd item.
- [67] (2024) HoPE: a novel positional encoding without long-term decay for enhanced context awareness and extrapolation. arXiv preprint arXiv:2410.21216. Cited by: 3rd item, Table 3.
- [68] (2023) LongLoRA: efficient fine-tuning of long-context large language models. arXiv preprint arXiv:2309.12307. Cited by: §7.1.2.
- [69] (2024) LongLoRA: efficient fine-tuning of long-context large language models. In The International Conference on Learning Representations (ICLR), Cited by: Table 2.
- [70] (2024) How far are we to gpt-4v? closing the gap to commercial multimodal models with open-source suites. CoRR abs/2404.16821. External Links: Document, 2404.16821, Link Cited by: §8.6.
- [71] (2024) What are the essential factors in crafting effective long context multi-hop instruction datasets? insights and best practices. ArXiv abs/2409.01893. Cited by: §2.2.2, Table 2.
- [72] (2024) XRAG: extreme context compression for retrieval-augmented generation with one token. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, External Links: Link Cited by: §4.1.2.
- [73] (2023) Adapting language models to compress contexts. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, H. Bouamor, J. Pino, and K. Bali (Eds.), Singapore, pp. 3829–3846. External Links: Document, Link Cited by: §4.1.2.
- [74] (2023) Latent positional information is in the self-attention variance of transformer language models without positional embeddings. arXiv preprint arXiv:2305.13571. Cited by: 3rd item, 3rd item, Table 3.
- [75] (2022) Kerple: kernelized relative positional embedding for length extrapolation. Advances in Neural Information Processing Systems 35, pp. 8386–8399. Cited by: 2nd item, Table 3.
- [76] (2022) Dissecting transformer length extrapolation via the lens of receptive field analysis. arXiv preprint arXiv:2212.10356. Cited by: 2nd item, Table 3.
- [77] (2024) M-longdoc: A benchmark for multimodal super-long document understanding and A retrieval-aware tuning framework. CoRR abs/2411.06176. External Links: Document, 2411.06176, Link Cited by: §8.6.
- [78] (2019) Generating long sequences with sparse transformers. External Links: 1904.10509, Link Cited by: 1st item.
- [79] (2024) Weighted grouped query attention in transformers. External Links: 2407.10855, Link Cited by: §3.2.1.
- [80] (2018) Towards coherent and cohesive long-form text generation. arXiv preprint arXiv:1811.00511. Cited by: §6.2.
- [81] (2025) Mamba drafters for speculative decoding. arXiv preprint arXiv:2506.01206. Cited by: §5.2.5.
- [82] (2021) Rethinking attention with performers. In ICLR, Cited by: §3.2.2.
- [83] (2024) PaLM: scaling language modeling with pathways. J. Mach. Learn. Res. 24 (1). External Links: ISSN 1532-4435 Cited by: §2.1.2.
- [84] (2024) Learning to compress prompt in natural language formats. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), K. Duh, H. Gomez, and S. Bethard (Eds.), Mexico City, Mexico, pp. 7756–7767. External Links: Document, Link Cited by: §4.1.1.
- [85] (2024) Long input benchmark for russian analysis. arXiv preprint arXiv:2408.02439. Cited by: Table 7.
- [86] (2021) Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168. Cited by: 5th item.
- [87] (2024) C4AI command r7b: a 7 billion parameter multilingual model. Note: Access requires agreement to the License Agreement and adherence to C4AI’s Acceptable Use Policy. External Links: Link Cited by: §3.2.3.
- [88] (2024) LCFO: long context and long form output dataset and benchmarking. arXiv preprint arXiv:2412.08268. Cited by: 2nd item, §6.2.1, Table 8.
- [89] (2024) DENIAHL: in-context features influence llm needle-in-a-haystack abilities. arXiv preprint arXiv:2411.19360. Cited by: Table 6.
- [90] (2024) CORM: cache optimization with recent message for large language model inference. External Links: 2404.15949, Link Cited by: 2nd item.
- [91] (2019) Transformer-xl: attentive language models beyond a fixed-length context. In ACL (1), pp. 2978–2988. Cited by: §3.2.1.
- [92] (2022) Towards teachable reasoning systems: using a dynamic memory of user feedback for continual system improvement. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Y. Goldberg, Z. Kozareva, and Y. Zhang (Eds.), Abu Dhabi, United Arab Emirates, pp. 9465–9480. External Links: Document, Link Cited by: §4.2.
- [93] (2022) Flashattention: fast and memory-efficient exact attention with io-awareness. Advances in neural information processing systems 35, pp. 16344–16359. Cited by: §5.1.2, §9.3.
- [94] (2024) FlashAttention-2: faster attention with better parallelism and work partitioning. In The Twelfth International Conference on Learning Representations, Cited by: §5.1.2, §9.3.
- [95] (2021) A dataset of information-seeking questions and answers anchored in research papers. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 4599–4610. Cited by: 1st item.
- [96] (2024) DeepSeek-v3 technical report. External Links: 2412.19437, Link Cited by: §5.1.3.
- [97] (2023) DeepSeek official website. External Links: Link Cited by: §8.2.
- [98] (2025) 3FS: fire-flyer file system. GitHub. Note: https://github.com/deepseek-ai/3FS Cited by: §5.1.1.
- [99] (2018) Universal transformers. International Conference on Learning Representations. Cited by: §4.2.
- [100] (2024) Qlora: efficient finetuning of quantized llms. Advances in Neural Information Processing Systems 36. Cited by: §5.1.2.
- [101] (2019) BERT: pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), J. Burstein, C. Doran, and T. Solorio (Eds.), Minneapolis, Minnesota, pp. 4171–4186. External Links: Document, Link Cited by: §1, 2nd item, §4.3, §9.2.
- [102] (2019) BERT: pre-training of deep bidirectional transformers for language understanding. In North American Chapter of the Association for Computational Linguistics, Cited by: §3.2.1.
- [103] (2024) Longrope: extending llm context window beyond 2 million tokens. arXiv preprint arXiv:2402.13753. Cited by: 2nd item, Table 4.
- [104] (2020) Eflops: algorithm and system co-design for a high performance distributed training platform. In 2020 IEEE International Symposium on High Performance Computer Architecture (HPCA), pp. 610–622. Cited by: §5.1.1.
- [105] (2024) QAQ: quality adaptive quantization for llm kv cache. External Links: 2403.04643, Link Cited by: §5.2.1.
- [106] (2024) Hymba: a hybrid-head architecture for small language models. arXiv preprint arXiv:2411.13676. Cited by: 3rd item, §3.2.3.
- [107] (2023) Bamboo: a comprehensive benchmark for evaluating long text modeling capacities of large language models. arXiv preprint arXiv:2309.13345. Cited by: 3rd item, Table 7.
- [108] (2023) A survey on long text modeling with transformers. CoRR abs/2302.14502. External Links: Link, Document, 2302.14502 Cited by: Table 1, §1.
- [109] (2025) Sailor2: sailing in south-east asia with inclusive multilingual llm. arXiv preprint arXiv:2502.12982. Cited by: §1.
- [110] (2022) GLaM: efficient scaling of language models with mixture-of-experts. In International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, K. Chaudhuri, S. Jegelka, L. Song, C. Szepesvári, G. Niu, and S. Sabato (Eds.), Proceedings of Machine Learning Research, Vol. 162, pp. 5547–5569. External Links: Link Cited by: §2.1.1.
- [111] (2021) GLaM: efficient scaling of language models with mixture-of-experts. In International Conference on Machine Learning, Cited by: §2.1.2.
- [112] (2024) Towards event-oriented long video understanding. CoRR abs/2406.14129. External Links: Link, Document, 2406.14129 Cited by: §8.6, §8.6.
- [113] (2022) GLM: general language model pretraining with autoregressive blank infilling. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), S. Muresan, P. Nakov, and A. Villavicencio (Eds.), Dublin, Ireland, pp. 320–335. External Links: Document, Link Cited by: §3.2.1.
- [114] (2024) Efficient training of large language models on distributed infrastructures: a survey. arXiv preprint arXiv:2407.20018. Cited by: §5.1.
- [115] SKVQ: sliding-window key and value cache quantization for large language models. In First Conference on Language Modeling, Cited by: §5.2.1.
- [116] (2024) LayerSkip: enabling early exit inference and self-speculative decoding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), L. Ku, A. Martins, and V. Srikumar (Eds.), Cited by: §5.2.5.
- [117] (2021) QAFactEval: improved qa-based factual consistency evaluation for summarization. arXiv preprint arXiv:2112.08542. Cited by: 4th item.
- [118] (2019) Multi-news: a large-scale multi-document summarization dataset and abstractive hierarchical model. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 1074–1084. Cited by: 2nd item, §6.2.1, §6.2.3, Table 8.
- [119] (2019) ELI5: long form question answering. arXiv preprint arXiv:1907.09190. Cited by: 1st item, §6.2.1, §6.2.3, Table 8.
- [120] (2024) MedOdyssey: A medical domain benchmark for long context evaluation up to 200k tokens. CoRR abs/2406.15019. External Links: Link, Document, 2406.15019 Cited by: Table 7, §8.7.
- [121] (2024) What is wrong with perplexity for long-context language modeling?. arXiv preprint arXiv:2410.23771. Cited by: §7.1.2.
- [122] (2024) Scaling laws for dense retrieval. arXiv preprint arXiv: 2403.18684. Cited by: §4.3.
- [123] (2025) Artificial hippocampus networks for efficient long-context modeling. arXiv preprint arXiv:2510.07318. Cited by: §3.2.3.
- [124] (2024) HERMES: temporal-coherent long-form understanding with episodes and semantics. CoRR abs/2408.17443. External Links: Document, 2408.17443, Link Cited by: §8.6.
- [125] (2025) Ada-kv: optimizing kv cache eviction by adaptive budget allocation for efficient llm inference. External Links: 2407.11550, Link Cited by: 4th item.
- [126] (2024) LazyLLM: dynamic token pruning for efficient long context llm inference. External Links: 2407.14057, Link Cited by: 3rd item.
- [127] (2024) MoA: mixture of sparse attention for automatic large language model compression. External Links: 2406.14909, Link Cited by: §3.2.1.
- [128] (2024) Data engineering for scaling language models to 128k context. ArXiv abs/2402.10171. Cited by: §2.1.2.
- [129] (2024) Not all heads matter: a head-level kv cache compression method with integrated retrieval and reasoning. External Links: 2410.19258, Link Cited by: 4th item.
- [130] (2025) Not all heads matter: a head-level KV cache compression method with integrated retrieval and reasoning. In The Thirteenth International Conference on Learning Representations, External Links: Link Cited by: §7.2.2.
- [131] (2024) Quest: query-centric data synthesis approach for long-context scaling of large language model. ArXiv abs/2405.19846. Cited by: §2.1.3.
- [132] (2024) Unifying demonstration selection and compression for in-context learning. External Links: 2405.17062, Link Cited by: §4.1.2.
- [133] (2020) The pile: an 800gb dataset of diverse text for language modeling. ArXiv abs/2101.00027. Cited by: §2.1.2.
- [134] (2022) Precise zero-shot dense retrieval without relevance labels. arXiv preprint arXiv: 2212.10496. Cited by: §4.3.
- [135] (2019) Abstractive text summarization by incorporating reader comments. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pp. 6399–6406. External Links: Link, Document Cited by: §8.7.
- [136] (2024) How to train long-context language models (effectively). arXiv preprint arXiv:2410.02660. Cited by: §2.1.2, §5.1.1.
- [137] (2024) SeerAttention: learning intrinsic sparse attention in your llms. External Links: 2410.13276, Link Cited by: §3.2.1.
- [138] (2024) LongIns: a challenging long-context instruction-based exam for llms. arXiv preprint arXiv:2406.17588. Cited by: Table 6.
- [139] (2024) V2PE: improving multimodal long-context capability of vision-language models with variable visual position encoding. CoRR abs/2412.09616. External Links: Document, 2412.09616, Link Cited by: §8.6.
- [140] (2024) Model tells you what to discard: adaptive KV cache compression for LLMs. In The Twelfth International Conference on Learning Representations, External Links: Link Cited by: 2nd item.
- [141] (2024) In-context autoencoder for context compression in a large language model. In The Twelfth International Conference on Learning Representations, External Links: Link Cited by: §4.1.2.
- [142] (2024) Clustering and ranking: diversity-preserved instruction selection through expert-aligned quality estimation. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), Miami, Florida, USA, pp. 464–478. External Links: Document, Link Cited by: §2.2.1.
- [143] (2017) Convolutional sequence to sequence learning. In International conference on machine learning, pp. 1243–1252. Cited by: 2nd item, Table 3.
- [144] (2024) LongVALE: vision-audio-language-event benchmark towards time-aware omni-modal perception of long videos. CoRR abs/2411.19772. External Links: Document, 2411.19772, Link Cited by: §8.6.
- [145] Genspark.ai. External Links: Link Cited by: §8.2.
- [146] (2024) AI and memory wall. IEEE Micro. Cited by: §9.3.
- [147] (2022) GitHub copilot. External Links: Link Cited by: §8.4.
- [148] (2024) ChatGLM: a family of large language models from glm-130b to glm-4 all tools. External Links: 2406.12793 Cited by: §9.2.
- [149] (2024) The zamba2 suite: technical report. arXiv preprint arXiv:2411.15242. Cited by: §3.2.3.
- [150] (2024) Zamba: a compact 7b ssm hybrid model. arXiv preprint arXiv:2405.16712. Cited by: §3.2.3.
- [151] (2024) Leveraging long-context large language models for multi-document understanding and summarization in enterprise applications. CoRR abs/2409.18454. External Links: Link, Document, 2409.18454 Cited by: §8.5, §8.7.
- [152] (2024) Is it really long context if all you need is retrieval? towards genuinely difficult long context nlp. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. 16576–16586. Cited by: §6.1.3.
- [153] (2024) Goldfinch: high performance rwkv/transformer hybrid with linear pre-fill and extreme kv-cache compression. arXiv preprint arXiv:2407.12077. Cited by: §3.2.3.
- [154] (2024) Contextual position encoding: learning to count what’s important. arXiv preprint arXiv:2405.18719. Cited by: 1st item, §3.1.1, Table 3.
- [155] (2024) The llama 3 herd of models. arXiv preprint arXiv:2407.21783. Cited by: §1, §7.1.1, §9.2.
- [156] (2020) HiPPO: recurrent memory with optimal polynomial projections. In NeurIPS, Cited by: §3.2.2.
- [157] (2023) Mamba: linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752. Cited by: §3.2.2.
- [158] (2024) Mamba: linear-time sequence modeling with selective state spaces. In First Conference on Language Modeling, External Links: Link Cited by: §3.2.2.
- [159] (2022) Efficiently modeling long sequences with structured state spaces. In The International Conference on Learning Representations (ICLR), Cited by: §3.2.2.
- [160] (2021) Combining recurrent, convolutional, and continuous-time models with linear state space layers. In NeurIPS, pp. 572–585. Cited by: §3.2.2.
- [161] (2022) LOT: a story-centric benchmark for evaluating chinese long text understanding and generation. Transactions of the Association for Computational Linguistics 10, pp. 434–451. Cited by: 1st item, 2nd item, §6.2.3, Table 8.
- [162] (2024) Aptq: attention-aware post-training mixed-precision quantization for large language models. In Proceedings of the 61st ACM/IEEE Design Automation Conference, pp. 1–6. Cited by: §5.1.2.
- [163] (2023) Textbooks are all you need. CoRR abs/2306.11644. External Links: Document, 2306.11644, Link Cited by: §2.1.1.
- [164] (2024) Late chunking: contextual chunk embeddings using long-context embedding models. arXiv preprint arXiv: 2409.04701. Cited by: §4.3.
- [165] (2023) Jina embeddings 2: 8192-token general-purpose text embeddings for long documents. CoRR abs/2310.19923. External Links: Link, Document, 2310.19923 Cited by: §8.5.
- [166] (2025) Deepseek-r1: incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948. Cited by: §1, §9.1, §9.2, §9.3.
- [167] (2022) LongT5: efficient text-to-text transformer for long sequences. In Findings of the Association for Computational Linguistics: NAACL 2022, Seattle, WA, United States, July 10-15, 2022, M. Carpuat, M. de Marneffe, and I. V. M. Ruíz (Eds.), pp. 724–736. External Links: Link, Document Cited by: §8.5.
- [168] (2020) REALM: retrieval-augmented language model pre-training. In Proceedings of the 37th International Conference on Machine Learning, ICML’20. Cited by: §2.1.3, §4.3.
- [169] (2024) LM-infinite: zero-shot extreme length generalization for large language models. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), K. Duh, H. Gomez, and S. Bethard (Eds.), Mexico City, Mexico, pp. 3991–4008. External Links: Link, Document Cited by: 1st item, §3.1.2, §7.2.2.
- [170] (2023) FLatten transformer: vision transformer using focused linear attention. In ICCV, pp. 5938–5948. Cited by: §3.2.2.
- [171] (2024) Rethinking token reduction in mllms: towards a unified paradigm for training-free acceleration. CoRR abs/2411.17686. External Links: Document, 2411.17686, Link Cited by: §8.6.
- [172] (2024) ReVisionLLM: recursive vision-language model for temporal grounding in hour-long videos. CoRR abs/2411.14901. External Links: Document, 2411.14901, Link Cited by: §8.6, §8.6.
- [173] (2023) WanJuan: a comprehensive multimodal dataset for advancing english and chinese large models. ArXiv abs/2308.10755. External Links: Link Cited by: Table 2.
- [174] (2024) Fastdecode: high-throughput gpu-efficient llm serving using heterogeneous pipelines. arXiv preprint arXiv:2403.11421. Cited by: §5.2.4.
- [175] (2023) Never lost in the middle: mastering long-context question answering with position-agnostic decompositional training. arXiv preprint arXiv:2311.09198. Cited by: §7.1.1.
- [176] (2024) Never lost in the middle: mastering long-context question answering with position-agnostic decompositional training. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), L. Ku, A. Martins, and V. Srikumar (Eds.), Bangkok, Thailand, pp. 13628–13642. External Links: Document, Link Cited by: §2.2.2, Table 2.
- [177] (2018) DuReader: a chinese machine reading comprehension dataset from real-world applications. In Proceedings of the Workshop on Machine Reading for Question Answering, pp. 37–46. Cited by: 1st item.
- [178] (2025) Can large language models detect errors in long chain-of-thought reasoning?. arXiv preprint arXiv:2502.19361. Cited by: §9.1.
- [179] (2024) Two stones hit one bird: bilevel positional encoding for better length extrapolation. arXiv preprint arXiv:2401.16421. Cited by: 1st item, Table 4.
- [180] (2020) Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300. Cited by: 5th item.
- [181] (2024) Multilingual needle in a haystack: investigating long-context behavior of multilingual large language models. External Links: 2408.10151, Link Cited by: Table 6.
- [182] (2023) Improving long context document-level machine translation. CoRR abs/2306.05183. External Links: Link, Document, 2306.05183 Cited by: §8.5.
- [183] (2024) Evaluating and training long-context large language models for question answering on scientific papers. In Proceedings of the 1st Workshop on Customizable NLP: Progress and Challenges in Customizing NLP for a Domain, Application, Group, or Individual (CustomNLP4U), S. Kumar, V. Balachandran, C. Y. Park, W. Shi, S. A. Hayati, Y. Tsvetkov, N. Smith, H. Hajishirzi, D. Kang, and D. Jurgens (Eds.), Miami, Florida, USA, pp. 220–236. External Links: Link, Document Cited by: §8.7.
- [184] (2020) Constructing a multi-hop qa dataset for comprehensive evaluation of reasoning steps. In Proceedings of the 28th International Conference on Computational Linguistics, pp. 6609–6625. Cited by: 1st item.
- [185] (2022) An empirical analysis of compute-optimal large language model training. In Advances in Neural Information Processing Systems, A. H. Oh, A. Agarwal, D. Belgrave, and K. Cho (Eds.), Cited by: §2.1.2.
- [186] (2024) ORPO: monolithic preference optimization without reference model. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), Miami, Florida, USA, pp. 11170–11189. External Links: Document, Link Cited by: §2.2.2.
- [187] (2023) Speed: speculative pipelined execution for efficient decoding. arXiv preprint arXiv:2310.12072. Cited by: §5.2.5.
- [188] (2025) Kvquant: towards 10 million context length llm inference with kv cache quantization. Advances in Neural Information Processing Systems 37, pp. 1270–1303. Cited by: §5.2.1.
- [189] (2024) A benchmark for long-form medical question answering. arXiv preprint arXiv:2411.09834. Cited by: 2nd item, §6.2.1, Table 8.
- [190] (2024) RULER: what’s the real context size of your long-context language models?. In First Conference on Language Modeling, Cited by: 2nd item, 2nd item, Table 6, §7.1.1, Table 9, Table 9, §9.2.
- [191] (2024) Memserve: context caching for disaggregated llm serving with elastic memory pool. arXiv preprint arXiv:2406.17565. Cited by: §5.2.2.
- [192] (2025) Efficient long-decoding inference with reasoning-aware attention sparsity. arXiv preprint arXiv:2502.11147. Cited by: §9.1.
- [193] (2024) Os agents: a survey on mllm-based agents for general computing devices use. Preprints. Cited by: §8.1.
- [194] Can perplexity reflect large language model’s ability in long text understanding?. In The Second Tiny Papers Track at ICLR 2024, Cited by: §7.1.2.
- [195] (2024) LongRecipe: recipe for efficient long context generalization in large language models. arXiv preprint arXiv:2409.00509. Cited by: 2nd item, Table 4.
- [196] (2021) Efficient attentions for long document summarization. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 1419–1436. Cited by: 2nd item, §7.1.2.
- [197] (2023) Benchmarking large language models as AI research agents. CoRR abs/2310.03302. External Links: Link, Document, 2310.03302 Cited by: §8.1.
- [198] (2024) OpenCoder: the open cookbook for top-tier code large language models. External Links: Link Cited by: §1.
- [199] (2024) SliM-llm: salience-driven mixed-precision quantization for large language models. arXiv preprint arXiv:2405.14917. Cited by: §5.1.2.
- [200] (2024) Advancing transformer architecture in long-context large language models: a comprehensive survey. External Links: 2311.12351 Cited by: Table 1.
- [201] Compression represents intelligence linearly. In First Conference on Language Modeling, Cited by: §7.1.2.
- [202] (2024) O1 replication journey–part 2: surpassing o1-preview through simple distillation, big progress or bitter lesson?. arXiv preprint arXiv:2411.16489. Cited by: §9.1.
- [203] (2024) Qwen2.5-coder technical report. CoRR abs/2409.12186. External Links: Link, Document, 2409.12186 Cited by: §8.4.
- [204] (2022) Block-recurrent transformers. In NeurIPS, Cited by: §3.2.1.
- [205] (2023) I’m pi, your personal ai. Note: https://inflection.ai/ External Links: Link Cited by: §8.3.
- [206] (2020) R4C: a benchmark for evaluating rc systems to get the right answer for the right reason. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 6740–6750. Cited by: 2nd item.
- [207] (2021) Leveraging passage retrieval with generative models for open domain question answering. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, P. Merlo, J. Tiedemann, and R. Tsarfaty (Eds.), Online, pp. 874–880. External Links: Document, Link Cited by: §4.3.
- [208] (2023) Atlas: few-shot learning with retrieval augmented language models. J. Mach. Learn. Res. 24, pp. 251:1–251:43. External Links: Link Cited by: §4.3.
- [209] (2023) Deepspeed ulysses: system optimizations for enabling training of extreme long sequence transformer models. arXiv preprint arXiv:2309.14509. Cited by: §5.1.2.
- [210] (2018) Neural tangent kernel: convergence and generalization in neural networks. Advances in neural information processing systems 31. Cited by: 2nd item.
- [211] (2025) The facts grounding leaderboard: benchmarking llms’ ability to ground responses to long-form input. arXiv preprint arXiv:2501.03200. Cited by: 4th item, §6.2.1, Table 8.
- [212] (2024) MATE: meet at the embedding - connecting images with long texts. In Findings of the Association for Computational Linguistics: EMNLP 2024, Miami, Florida, USA, November 12-16, 2024, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), pp. 1659–1672. External Links: Link Cited by: §8.6.
- [213] (2024) OLAPH: improving factuality in biomedical long-form question answering. arXiv preprint arXiv:2405.12701. Cited by: 1st item, §6.2.1, §6.2.3, Table 8.
- [214] (2024) Large language models still exhibit bias in long text. arXiv preprint arXiv:2410.17519. Cited by: 3rd item, §6.2.1, Table 8.
- [215] (2023) Mistral 7b. External Links: 2310.06825, Link Cited by: 1st item.
- [216] (2024) Efficient llm inference with i/o-aware partial kv cache recomputation. arXiv preprint arXiv:2411.17089. Cited by: §5.2.4.
- [217] (2024) Minference 1.0: accelerating pre-filling for long-context llms via dynamic sparse attention. Advances in Neural Information Processing Systems 37, pp. 52481–52515. Cited by: 1st item.
- [218] (2024) MInference 1.0: accelerating pre-filling for long-context llms via dynamic sparse attention. In Advances in Neural Information Processing Systems, A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang (Eds.), Vol. 37, pp. 52481–52515. External Links: Link Cited by: 2nd item.
- [219] (2023) LLMLingua: compressing prompts for accelerated inference of large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, H. Bouamor, J. Pino, and K. Bali (Eds.), Singapore, pp. 13358–13376. External Links: Link, Document Cited by: §4.1.1.
- [220] (2024) LongLLMLingua: accelerating and enhancing LLMs in long context scenarios via prompt compression. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), L. Ku, A. Martins, and V. Srikumar (Eds.), Bangkok, Thailand, pp. 1658–1677. External Links: Link, Document Cited by: §4.1.1.
- [221] (2024) A survey on large language models for code generation. CoRR abs/2406.00515. External Links: Link, Document, 2406.00515 Cited by: §8.4.
- [222] (2024) Many-shot in-context learning in multimodal foundation models. CoRR abs/2405.09798. External Links: Document, 2405.09798, Link Cited by: §8.6.
- [223] (2024) LongRAG: enhancing retrieval-augmented generation with long-context llms. CoRR abs/2406.15319. External Links: Link, Document, 2406.15319 Cited by: §8.2.
- [224] (2024) Longrag: enhancing retrieval-augmented generation with long-context llms. arXiv preprint arXiv:2406.15319. Cited by: §7.1.3.
- [225] (2024) SWE-bench: can language models resolve real-world github issues?. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024, External Links: Link Cited by: 6th item, §8.1.
- [226] (2024) Long-context llms meet RAG: overcoming challenges for long inputs in RAG. CoRR abs/2410.05983. External Links: Link, Document, 2410.05983 Cited by: §7.1.3, §8.2.
- [227] (2024) A comprehensive survey on process-oriented automatic text summarization with exploration of llm-based methods. CoRR abs/2403.02901. External Links: Link, Document, 2403.02901 Cited by: §8.5.
- [228] (2023) GrowLength: accelerating llms pretraining by progressively growing training length. ArXiv abs/2310.00576. Cited by: §2.1.2.
- [229] (2024) Llm maybe longlm: self-extend llm context window without tuning. arXiv preprint arXiv:2401.01325. Cited by: Table 4.
- [230] (2024) Understanding the impact of long-term memory on self-disclosure with large language model-driven chatbots for public health intervention. In Proceedings of the CHI Conference on Human Factors in Computing Systems, CHI 2024, Honolulu, HI, USA, May 11-16, 2024, F. ’. Mueller, P. Kyburz, J. R. Williamson, C. Sas, M. L. Wilson, P. O. T. Dugas, and I. Shklovski (Eds.), pp. 440:1–440:21. External Links: Link, Document Cited by: §8.3.
- [231] (2024) REAPER: reasoning based retrieval planning for complex rag systems. arXiv preprint arXiv: 2407.18553. Cited by: §4.3.
- [232] (2017) TriviaQA: a large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1601–1611. Cited by: 4th item.
- [233] (2024) Familiarity-aware evidence compression for retrieval-augmented generation. External Links: 2409.12468, Link Cited by: §4.1.1.
- [234] (2024) Discrete prompt compression with reinforcement learning. IEEE Access 12, pp. 72578–72587. External Links: Document, ISSN 2169-3536, Link Cited by: §4.1.1.
- [235] (1960) A new approach to linear filtering and prediction problems. Cited by: §3.2.2.
- [236] (2023) Needle in a haystack - pressure testing llms. GitHub. Note: https://github.com/gkamradt/LLMTest_NeedleInAHaystack Cited by: 2nd item.
- [237] (2024) GEAR: an efficient kv cache compression recipe for near-lossless generative inference of llm. External Links: 2403.05527, Link Cited by: §5.2.1.
- [238] (2024) Promises and pitfalls of artificial intelligence for legal applications. CoRR abs/2402.01656. External Links: Link, Document, 2402.01656 Cited by: §8.7.
- [239] (2024) One thousand and one pairs: a "novel" challenge for long-context language models. External Links: https://arxiv.org/abs/2406.16264 Cited by: 1st item, Table 7.
- [240] (2020) Transformers are rnns: fast autoregressive transformers with linear attention. In ICML, Proceedings of Machine Learning Research, Vol. 119, pp. 5156–5165. Cited by: §3.2.2.
- [241] (2024) The impact of positional encoding on length generalization in transformers. Advances in Neural Information Processing Systems 36. Cited by: 3rd item, 3rd item, Table 3, §7.2.3.
- [242] (2019) Generalization through memorization: nearest neighbor language models. International Conference on Learning Representations. Cited by: §4.3.
- [243] (2024) Tccl: discovering better communication paths for pcie gpu clusters. In Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3, pp. 999–1015. Cited by: §5.1.3.
- [244] (2018) Introduction to kalman filter and its applications. In Introduction and Implementations of the Kalman Filter, F. Govaers (Ed.), Cited by: §3.2.2.
- [245] (2025) You only read once (YORO): learning to internalize database knowledge for text-to-SQL. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), L. Chiruzzo, A. Ritter, and L. Wang (Eds.), Albuquerque, New Mexico, pp. 1889–1901. External Links: Link, Document, ISBN 979-8-89176-189-6 Cited by: §4.2.
- [246] (2018) The narrativeqa reading comprehension challenge. Transactions of the Association for Computational Linguistics 6, pp. 317–328. Cited by: 1st item.
- [247] (2018) The NarrativeQA reading comprehension challenge. Transactions of the Association for Computational Linguistics 6, pp. 317–328. External Links: Document, Link Cited by: Table 2.
- [248] (2023) LongForm: effective instruction tuning with reverse instructions. arXiv preprint arXiv:2304.08460. Cited by: 1st item, §6.2.1, §6.2.3, Table 8.
- [249] (2023) Reducing activation recomputation in large transformer models. Proceedings of Machine Learning and Systems 5, pp. 341–353. Cited by: §5.1.2, §9.3.
- [250] (2021) Efficient sequence packing without cross-contamination: accelerating large language models without impacting performance. arXiv preprint arXiv:2107.02027. Cited by: §5.1.1.
- [251] (2021) Hurdles to progress in long-form question answering. arXiv preprint arXiv:2103.06332. Cited by: §6.2.3.
- [252] (2020) Aquamuse: automatically generating datasets for query-based multi-document summarization. arXiv preprint arXiv:2010.12694. Cited by: §6.2.1, §6.2.3, Table 8.
- [253] (2024) Longlamp: a benchmark for personalized long-form text generation. arXiv preprint arXiv:2407.11016. Cited by: 1st item, §6.2.1, Table 8.
- [254] (2024) Enhancing training efficiency using packing with flash attention. arXiv preprint arXiv:2407.09105. Cited by: §5.1.1.
- [255] (2025) Cramming 1568 tokens into a single vector and back again: exploring the limits of embedding space capacity. arXiv preprint arXiv:2502.13063. Cited by: §4.1.2.
- [256] (2024) BABILong: testing the limits of llms with long context reasoning-in-a-haystack. arXiv preprint arXiv:2406.10149. Cited by: 2nd item, Table 6, §7.1.1.
- [257] (2023) M4le: a multi-ability multi-range multi-task multi-domain long-context evaluation benchmark for large language models. arXiv preprint arXiv:2310.19240. Cited by: Table 6.
- [258] (2019) Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics 7, pp. 452–466. Cited by: 4th item, §6.2.1.
- [259] (2023) Efficient memory management for large language model serving with pagedattention. In Proceedings of the 29th Symposium on Operating Systems Principles, pp. 611–626. Cited by: §5.2.2.
- [260] (2024) Summary of a haystack: a challenge to long-context llms and rag systems. arXiv preprint arXiv:https://arxiv.org/pdf/2407.01370. Cited by: 2nd item, Table 6.
- [261] Perplexity. Note: Accessed: 2024-05-30 External Links: Link Cited by: §8.2.
- [262] (2023) Learning to reason and memorize with self-notes. In Advances in Neural Information Processing Systems, A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (Eds.), Vol. 36, pp. 11891–11911. External Links: Link Cited by: §4.4.
- [263] (2023) Prompted llms as chatbot modules for long open-domain conversation. In Findings of the Association for Computational Linguistics: ACL 2023, Toronto, Canada, July 9-14, 2023, A. Rogers, J. L. Boyd-Graber, and N. Okazaki (Eds.), pp. 4536–4554. External Links: Link, Document Cited by: §8.3.
- [264] (2024) Can long-context language models subsume retrieval, rag, sql, and more?. arXiv preprint arXiv:2406.13121. Cited by: §1, 3rd item, 4th item, 5th item, Table 7, §7.1.3.
- [265] (2024) A human-inspired reading agent with gist memory of very long contexts. In Forty-first International Conference on Machine Learning, ICML 2024, Vienna, Austria, July 21-27, 2024, External Links: Link Cited by: §4.4.
- [266] (2024) ETHIC: evaluating large language models on long-context tasks with high information coverage. arXiv preprint arXiv:2410.16848. Cited by: Table 7.
- [267] (2023) Qasa: advanced question answering on scientific articles. In International Conference on Machine Learning, pp. 19036–19052. Cited by: 4th item, 3rd item, §6.2.1, Table 8.
- [268] (2024) S3Eval: a synthetic, scalable, systematic evaluation suite for large language model. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 1259–1286. Cited by: Table 6.
- [269] (2020) Mining of massive data sets. Cambridge university press. Cited by: §2.1.1.
- [270] (2021) The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, M. Moens, X. Huang, L. Specia, and S. W. Yih (Eds.), Online and Punta Cana, Dominican Republic, pp. 3045–3059. External Links: Document, Link Cited by: §4.1.2.
- [271] (2023) Fast inference from transformers via speculative decoding. In International Conference on Machine Learning, pp. 19274–19286. Cited by: §5.2.5.
- [272] (2024) Selective attention improves transformer. External Links: 2410.02703, Link Cited by: §3.2.1.
- [273] (2022) The inductive bias of in-context learning: rethinking pretraining example design. In International Conference on Learning Representations, Cited by: §2.1.3.
- [274] (2020) Retrieval-augmented generation for knowledge-intensive nlp tasks. arXiv preprint arXiv: 2005.11401. Cited by: §4.3.
- [275] (2024) LLaVA-onevision: easy visual task transfer. CoRR abs/2408.03326. External Links: Document, 2408.03326, Link Cited by: §8.6.
- [276] (2025) LLMs can easily learn to reason from demonstrations structure, not content, is what matters!. arXiv preprint arXiv:2502.07374. Cited by: §9.1.
- [277] (2023) How long can context length of open-source llms truly promise?. In NeurIPS 2023 Workshop on Instruction Tuning and Instruction Following, Cited by: 2nd item.
- [278] (2024) Demystifying workload imbalances in large transformer model training over variable-length sequences. arXiv preprint arXiv:2412.07894. Cited by: §5.1.1.
- [279] (2023) LooGLE: can long-context language models understand long contexts?. arXiv preprint arXiv:2311.04939. Cited by: 3rd item, Table 7.
- [280] (2025) FlashMLA: efficient mla decoding kernels. GitHub. Note: https://github.com/deepseek-ai/FlashMLA Cited by: §5.1.2.
- [281] (2015) A diversity-promoting objective function for neural conversation models. arXiv preprint arXiv:1510.03055. Cited by: 2nd item.
- [282] (2023) BLIP-2: bootstrapping language-image pre-training with frozen image encoders and large language models. In International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, A. Krause, E. Brunskill, K. Cho, B. Engelhardt, S. Sabato, and J. Scarlett (Eds.), Proceedings of Machine Learning Research, Vol. 202, pp. 19730–19742. External Links: Link Cited by: §8.6.
- [283] (2023) From quantity to quality: boosting llm performance with self-guided data selection for instruction tuning. ArXiv abs/2308.12032. Cited by: §2.2.1.
- [284] (2024) NeedleBench: can llms do retrieval and reasoning in 1 million context window?. arXiv preprint arXiv:2407.11963. Cited by: 2nd item, 2nd item.
- [285] (2023) Fptq: fine-grained post-training quantization for large language models. arXiv preprint arXiv:2308.15987. Cited by: §5.1.2.
- [286] (2025) Temporal preference optimization for long-form video understanding. CoRR abs/2501.13919. External Links: Document, 2501.13919, Link Cited by: §8.6.
- [287] (2023) Functional interpolation for relative positions improves long context transformers. arXiv preprint arXiv:2310.04418. Cited by: 1st item, Table 3.
- [288] (2024) GraphReader: building graph-based agent to enhance long-context abilities of large language models. Conference on Empirical Methods in Natural Language Processing. External Links: Document Cited by: §4.4.
- [289] (2024) 2D-dpo: scaling direct preference optimization with 2-dimensional supervision. ArXiv abs/2410.19720. Cited by: §2.2.2.
- [290] (2024) Long-context llms struggle with long in-context learning. arXiv preprint arXiv:2404.02060. Cited by: 5th item, Table 7.
- [291] (2025) VideoChat-flash: hierarchical compression for long-context video modeling. CoRR abs/2501.00574. External Links: Link, Document, 2501.00574 Cited by: §8.6.
- [292] (2024) Making long-context language models better multi-hop reasoners. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2024, Bangkok, Thailand, August 11-16, 2024, L. Ku, A. Martins, and V. Srikumar (Eds.), pp. 2462–2475. External Links: Link, Document Cited by: §8.2.
- [293] (2023) Compressing context to enhance inference efficiency of large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, H. Bouamor, J. Pino, and K. Bali (Eds.), Singapore, pp. 6342–6353. External Links: Document, Link Cited by: §4.1.1.
- [294] (2024) Scbench: a kv cache-centric analysis of long-context methods. arXiv preprint arXiv:2412.10319. Cited by: 1st item.
- [295] (2025) Small models struggle to learn from strong reasoners. arXiv preprint arXiv:2502.12143. Cited by: §9.1.
- [296] (2024) SnapKV: LLM knows what you are looking for before generation. In NeurIPS, Cited by: 2nd item.
- [297] (2024) EAGLE: speculative sampling requires rethinking feature uncertainty. In Proceedings of the 41st International Conference on Machine Learning, pp. 28935–28948. Cited by: §5.2.5.
- [298] (2024) Retrieval augmented generation or long-context llms? a comprehensive study and hybrid approach. arXiv preprint arXiv:2407.16833. Cited by: §7.1.3, §7.1.3.
- [299] (2024) Prompt compression for large language models: a survey. ArXiv abs/2410.12388. External Links: Link Cited by: Table 1.
- [300] (2024) Prompt compression for large language models: a survey. External Links: 2410.12388, Link Cited by: §4.1.
- [301] (2024) 500xCompressor: generalized prompt compression for large language models. External Links: 2408.03094, Link Cited by: §4.1.2.
- [302] (2024) KeyVideoLLM: towards large-scale video keyframe selection. CoRR abs/2407.03104. External Links: Document, 2407.03104, Link Cited by: §8.6.
- [303] (2023) Open-ended long text generation via masked language modeling. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 223–241. Cited by: 2nd item.
- [304] (2024) Jamba: a hybrid transformer-mamba language model. arXiv preprint arXiv:2403.19887. Cited by: §3.2.3.
- [305] (2004) Rouge: a package for automatic evaluation of summaries. In Text summarization branches out, pp. 74–81. Cited by: 1st item.
- [306] (2024) AWQ: activation-aware weight quantization for on-device llm compression and acceleration. Proceedings of Machine Learning and Systems 6, pp. 87–100. Cited by: §5.1.2.
- [307] (2025) LongReason: a synthetic long-context reasoning benchmark via context expansion. arXiv preprint arXiv:2501.15089. Cited by: Table 6.
- [308] (2024) Transformer-vq: linear-time transformers via vector quantization. In ICLR, Cited by: §3.2.2.
- [309] (2024) Prompt compression with context-aware sentence encoding for fast and improved llm inference. External Links: 2409.01227, Link Cited by: §4.1.1.
- [310] (2024) DeepSeek-v2: a strong, economical, and efficient mixture-of-experts language model. CoRR. Cited by: §3.2.1, §9.3.
- [311] (2024) World model on million-length video and language with ringattention. arXiv e-prints, pp. arXiv–2402. Cited by: §5.1.2.
- [312] (2023) Ring attention with blockwise transformers for near-infinite context. arXiv preprint arXiv:2310.01889. Cited by: §5.1.2.
- [313] (2024) RoleAgent: building, interacting, and benchmarking high-quality role-playing agents from scripts. In The Thirty-eight Conference on Neural Information Processing Systems Datasets and Benchmarks Track, External Links: Link Cited by: §4.4.
- [314] (2024) E2-LLM: efficient and extreme length extension of large language models. In Findings of the Association for Computational Linguistics: ACL 2024, L. Ku, A. Martins, and V. Srikumar (Eds.), Bangkok, Thailand, pp. 4243–4253. External Links: Document, Link Cited by: §1.
- [315] (2024) RepoQA: evaluating long context code understanding. arXiv preprint arXiv:2406.06025. Cited by: 2nd item, Table 6.
- [316] (2024) VisualWebBench: how far have multimodal llms evolved in web page understanding and grounding?. CoRR abs/2404.05955. External Links: Link, Document, 2404.05955 Cited by: §8.1.
- [317] (2024) STALL+: boosting llm-based repository-level code completion with static analysis. arXiv preprint arXiv:2406.10018. Cited by: §6.2.
- [318] (2023) TCRA-LLM: token compression retrieval augmented large language model for inference cost reduction. In Findings of the Association for Computational Linguistics: EMNLP 2023, H. Bouamor, J. Pino, and K. Bali (Eds.), Singapore, pp. 9796–9810. External Links: Document, Link Cited by: §4.1.1.
- [319] (2024) Lost in the middle: how language models use long contexts. Transactions of the Association for Computational Linguistics 12, pp. 157–173. Cited by: §2.2.2, §7.1.1, §9.5.
- [320] (2024) Unlocking data-free low-bit quantization with matrix decomposition for kv cache compression. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 2430–2440. Cited by: §5.2.1.
- [321] (2024) RegMix: data mixture as regression for language model pre-training. arXiv preprint arXiv:2407.01492. Cited by: §2.1.2.
- [322] (2024) MdEval: massively multilingual code debugging. arXiv preprint arXiv:2411.02310. Cited by: §1.
- [323] (2024) RepoBench: benchmarking repository-level code auto-completion systems. In The Twelfth International Conference on Learning Representations, Cited by: 6th item.
- [324] (2024) Multi-stage vision token dropping: towards efficient multimodal large language model. CoRR abs/2411.10803. External Links: Document, 2411.10803, Link Cited by: §8.6.
- [325] (2024) What makes good data for alignment? a comprehensive study of automatic data selection in instruction tuning. In The Twelfth International Conference on Learning Representations, Cited by: §2.2.1.
- [326] (2024) Longgenbench: long-context generation benchmark. arXiv preprint arXiv:2410.04199. Cited by: 5th item, 3rd item, Table 8, footnote 6.
- [327] (2025) Thus spake long-context large language model. External Links: Link Cited by: §1.
- [328] (2024) LongWanjuan: towards systematic measurement for long text quality. In Findings of the Association for Computational Linguistics: EMNLP 2024, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), Miami, Florida, USA, pp. 5709–5725. External Links: Document, Link Cited by: §2.1.1, Table 2.
- [329] (2023) Scaling laws of rope-based extrapolation. arXiv preprint arXiv:2310.05209. Cited by: §7.2.1.
- [330] (2022) ERNIE-SPARSE: learning hierarchical efficient transformer through regularized self-attention. CoRR abs/2203.12276. Cited by: §3.2.1.
- [331] (2024) Understanding llms: a comprehensive overview from training to inference. arXiv preprint arXiv:2401.02038. Cited by: §5.1.
- [332] (2024) Cachegen: kv cache compression and streaming for fast large language model serving. In Proceedings of the ACM SIGCOMM 2024 Conference, pp. 38–56. Cited by: §5.2.3.
- [333] (2023) Scissorhands: exploiting the persistence of importance hypothesis for llm kv cache compression at test time. In Advances in Neural Information Processing Systems, A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (Eds.), Vol. 36, pp. 52342–52364. External Links: Link Cited by: 2nd item.
- [334] (2024) KIVI: a tuning-free asymmetric 2bit quantization for KV cache. In Proceedings of the 41st International Conference on Machine Learning, pp. 32332–32344. Cited by: §5.2.1.
- [335] (2023) Segmented recurrent transformer: an efficient sequence-to-sequence model. In EMNLP (Findings), pp. 8325–8337. Cited by: §3.2.1.
- [336] (2023) Long-data-collections. Huggingface. Note: https://huggingface.co/datasets/togethercomputer/Long-Data-Collections Cited by: Table 2.
- [337] (2024) StarCoder 2 and the stack v2: the next generation. CoRR abs/2402.19173. External Links: Link, Document, 2402.19173 Cited by: §8.4.
- [338] (2025) MoBA: mixture of block attention for long-context llms. External Links: 2502.13189, Link Cited by: §3.2.1.
- [339] (2025) MoBA: mixture of block attention for long-context llms. arXiv preprint arXiv:2502.13189. Cited by: §5.1.2.
- [340] (2024) DataSculpt: crafting data landscapes for long-context llms through multi-objective partitioning. arXiv preprint arXiv:2409.00997. Cited by: §5.1.1.
- [341] (2024) A controlled study on long context extension and generalization in llms. arXiv preprint arXiv:2409.12181. Cited by: §7.1.2.
- [342] (2024) LongHeads: multi-head attention is secretly a long context processor. In EMNLP (Findings), pp. 7136–7148. Cited by: 4th item.
- [343] (2024) Extra global attention designation using keyword detection in sparse transformer architectures. External Links: 2410.08971, Link Cited by: §3.2.1.
- [344] (2024) Repoagent: an llm-powered open-source framework for repository-level code documentation generation. arXiv preprint arXiv:2402.16667. Cited by: §6.2.
- [345] (2024) A paradigm shift: the future of machine translation lies with large language models. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation, LREC/COLING 2024, 20-25 May, 2024, Torino, Italy, N. Calzolari, M. Kan, V. Hoste, A. Lenci, S. Sakti, and N. Xue (Eds.), pp. 1339–1352. External Links: Link Cited by: §8.5.
- [346] (2024) Visual perception by large language model’s weights. CoRR abs/2405.20339. External Links: Document, 2405.20339, Link Cited by: §8.6.
- [347] (2023) Query rewriting in retrieval-augmented large language models. In The 2023 Conference on Empirical Methods in Natural Language Processing, External Links: Link Cited by: §4.3.
- [348] (2025) CoT-valve: length-compressible chain-of-thought tuning. arXiv preprint arXiv:2502.09601. Cited by: §9.1.
- [349] (2024) Fine-tuning llama for multi-stage text retrieval. In Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval, pp. 2421–2425. Cited by: 3rd item.
- [350] (2024) MMLongBench-doc: benchmarking long-context document understanding with visualizations. CoRR abs/2407.01523. External Links: Document, 2407.01523, Link Cited by: §8.6.
- [351] (2022) Memory-assisted prompt editing to improve gpt-3 after deployment. arXiv preprint arXiv: 2201.06009. Cited by: §4.2.
- [352] (2024) Holistic reasoning with long-context lms: a benchmark for database operations on massive textual data. Note: *These authors contributed equally to this work. External Links: Link Cited by: Table 6.
- [353] (2023) D2 pruning: message passing for balancing diversity and difficulty in data pruning. CoRR abs/2310.07931. External Links: Document, 2310.07931, Link Cited by: §2.1.1.
- [354] (2024) DOLOMITES: domain-specific long-form methodical tasks. arXiv preprint arXiv:2405.05938. Cited by: §6.2.1, Table 8.
- [355] (2023) Expertqa: expert-curated questions and attributed answers. arXiv preprint arXiv:2309.07852. Cited by: 4th item, 4th item, §6.2.1, Table 8.
- [356] (2024) LongFin: A multimodal document understanding model for long financial domain documents. CoRR abs/2401.15050. External Links: Link, Document, 2401.15050 Cited by: §8.7.
- [357] (2022) DSI++: updating transformer memory with new documents. Conference on Empirical Methods in Natural Language Processing. External Links: Document Cited by: §4.2.
- [358] (2024) Base of rope bounds context length. External Links: 2405.14591, Link Cited by: §7.2.1.
- [359] (2022) Locating and editing factual associations in gpt. In Advances in Neural Information Processing Systems, S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (Eds.), Vol. 35, pp. 17359–17372. External Links: Link Cited by: §9.5.
- [360] (2024) SimPO: simple preference optimization with a reference-free reward. ArXiv abs/2405.14734. Cited by: §2.2.2.
- [361] (2017) Mixed precision training. arXiv preprint arXiv:1710.03740. Cited by: §5.1.2.
- [362] (2018) Document-level neural machine translation with hierarchical attention networks. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, E. Riloff, D. Chiang, J. Hockenmaier, and J. Tsujii (Eds.), pp. 2947–2954. External Links: Link, Document Cited by: §8.5.
- [363] (2010) Recurrent neural network based language model.. In Interspeech, Vol. 2, pp. 1045–1048. Cited by: §1.
- [364] (2023) Attention is off by one. External Links: Link Cited by: §7.2.2.
- [365] (2023) Factscore: fine-grained atomic evaluation of factual precision in long form text generation. arXiv preprint arXiv:2305.14251. Cited by: 1st item, §6.2.1, Table 8.
- [366] (2020) AmbigQA: answering ambiguous open-domain questions. arXiv preprint arXiv:2004.10645. Cited by: 5th item.
- [367] (2025) MiniMax-01: scaling foundation models with lightning attention. External Links: 2501.08313, Link Cited by: §1, §3.2.2, §3.2.3, §7.2.3.
- [368] (2024) Granite code models: A family of open foundation models for code intelligence. CoRR abs/2405.04324. External Links: Link, Document, 2405.04324 Cited by: §8.4.
- [369] (2024) A survey of conversational search. arXiv preprint arXiv: 2410.15576. Cited by: §4.3.
- [370] (2025) NoLiMa: long-context evaluation beyond literal matching. arXiv preprint arXiv:2502.05167. Cited by: 2nd item, §6.1.3, Table 6.
- [371] (2023) Landmark attention: random-access infinite context length for transformers. arXiv preprint arXiv:2305.16300. Cited by: 2nd item, §7.1.2.
- [372] (2023) Learning to compress prompts with gist tokens. In Advances in Neural Information Processing Systems, A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (Eds.), Vol. 36, pp. 19327–19352. External Links: Link Cited by: §4.1.2.
- [373] (2024) Generative representational instruction tuning. arXiv preprint arXiv: 2402.09906. Cited by: §4.3.
- [374] (2025) S1: simple test-time scaling. arXiv preprint arXiv:2501.19393. Cited by: §1, §9.1.
- [375] (2024) Leave no context behind: efficient infinite context transformers with infini-attention. CoRR abs/2404.07143. Cited by: §3.2.1.
- [376] (2024) Leave no context behind: efficient infinite context transformers with infini-attention. External Links: 2404.07143, Link Cited by: §3.2.2.
- [377] (2024) Neptune: the long orbit to benchmarking long video understanding. CoRR abs/2412.09582. External Links: Document, 2412.09582, Link Cited by: §8.6.
- [378] (2016) Abstractive text summarization using sequence-to-sequence rnns and beyond. arXiv preprint arXiv:1602.06023. Cited by: §6.2.1.
- [379] (2023) Mechanistic interpretability quickstart guide. Note: Accessed: 2025-01-30 External Links: Link Cited by: §9.5.
- [380] (2024) Taipan: efficient and expressive state space language models with selective attention. External Links: 2410.18572, Link Cited by: §3.2.2.
- [381] (2016) Ms marco: a human-generated machine reading comprehension dataset. Cited by: 3rd item, 2nd item, §6.2.1, Table 8.
- [382] (2024) A survey of large language models for financial applications: progress, prospects and challenges. CoRR abs/2406.11903. External Links: Link, Document, 2406.11903 Cited by: §8.7.
- [383] (2023) NTK-alibi: long text extrapolation of alibi position encoding through interpolation. External Links: Link Cited by: 2nd item.
- [384] (2023) NVIDIA h200. External Links: Link Cited by: §9.3.
- [385] (2022) In-context learning and induction heads. Transformer Circuits Thread. Note: https://transformer-circuits.pub/2022/in-context-learning-and-induction-heads/index.html Cited by: §7.2.2.
- [386] (2024) Learning to reason with large language models. Note: https://openai.com/index/learning-to-reason-with-llms/ Cited by: §1.
- [387] (2024) Memory and new controls for chatgpt. Note: Accessed: 2024-02-13 External Links: Link Cited by: §8.3.
- [388] (2024) New embedding models and api updates. Note: Accessed: 2024-01-25 External Links: Link Cited by: §8.5.
- [389] (2022) Training language models to follow instructions with human feedback. ArXiv abs/2203.02155. External Links: Link Cited by: §2.2.2.
- [390] (2023) Fast attention over long sequences with dynamic sparse flash attention. Advances in Neural Information Processing Systems 36, pp. 59808–59831. Cited by: §5.1.2.
- [391] (2023) Giraffe: adventures in expanding context lengths in llms. arXiv preprint arXiv:2308.10882. Cited by: Table 4, 1st item.
- [392] (2024) LLMLingua-2: data distillation for efficient and faithful task-agnostic prompt compression. In Findings of the Association for Computational Linguistics: ACL 2024, L. Ku, A. Martins, and V. Srikumar (Eds.), Bangkok, Thailand, pp. 963–981. External Links: Link, Document Cited by: §4.1.1.
- [393] (2022) QuALITY: question answering with long input texts, yes!. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 5336–5358. Cited by: 1st item.
- [394] (2002) Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pp. 311–318. Cited by: 1st item.
- [395] (2024) Improving throughput-oriented llm inference with cpu computations. In Proceedings of the 2024 International Conference on Parallel Architectures and Compilation Techniques, pp. 233–245. Cited by: §5.2.4.
- [396] (2023) Generative agents: interactive simulacra of human behavior. ACM Symposium on User Interface Software and Technology. External Links: Document Cited by: §4.2, §4.4.
- [397] (2024) Can mamba learn how to learn? A comparative study on in-context learning tasks. In ICML, Cited by: §3.2.3.
- [398] (2024) Splitwise: efficient generative llm inference using phase splitting. In 2024 ACM/IEEE 51st Annual International Symposium on Computer Architecture (ISCA), pp. 118–132. Cited by: §5.2.3.
- [399] (2024) The what, why, and how of context length extension techniques in large language models - A detailed survey. CoRR abs/2401.07872. External Links: Link, Document, 2401.07872 Cited by: §1.
- [400] (2023) RWKV: reinventing rnns for the transformer era. In EMNLP (Findings), pp. 14048–14077. Cited by: §3.2.2.
- [401] (2024) Eagle and finch: rwkv with matrix-valued states and dynamic recurrence. External Links: 2404.05892, Link Cited by: §3.2.2.
- [402] (2023) Yarn: efficient context window extension of large language models. arXiv preprint arXiv:2309.00071. Cited by: 2nd item, Table 4, Table 4, Figure 10, Figure 10, §7.1.2, §7.2.1, §7.2.2.
- [403] (2023) NTK-aware scaled rope allows llama models to have extended (8k+) context size without any fine-tuning and minimal perplexity degradation.. Note: https://www.reddit.com/r/LocalLLaMA/comments/14lz7j5/ntkaware_scaled_rope_allows_llama_models_to_have Cited by: §7.1.2.
- [404] (2023) Fp8-lm: training fp8 large language models. arXiv preprint arXiv:2310.18313. Cited by: §5.1.2.
- [405] (2024) Suri: multi-constraint instruction following for long-form text generation. arXiv preprint arXiv:2406.19371. Cited by: §6.2.1, Table 8.
- [406] (2024) Examining long-context large language models for environmental review document comprehension. arXiv preprint arXiv:2407.07321. Cited by: Table 7.
- [407] (2025) LongDPO: unlock better long-form generation abilities for llms via critique-augmented stepwise information. External Links: 2502.02095, Link Cited by: §2.2.2, Table 2.
- [408] (2024) Dataset decomposition: faster llm training with variable sequence length curriculum. arXiv preprint arXiv:2405.13226. Cited by: §5.1.1.
- [409] (2024) SPIQA: A dataset for multimodal question answering on scientific papers. CoRR abs/2407.09413. External Links: Document, 2407.09413, Link Cited by: §8.6.
- [410] (2021) Train short, test long: attention with linear biases enables input length extrapolation. arXiv preprint arXiv:2108.12409. Cited by: 2nd item, Table 3, §6.1.1.
- [411] (2023) Zero bubble pipeline parallelism. arXiv preprint arXiv:2401.10241. Cited by: §9.3.
- [412] (2024) LONG2RAG: evaluating long-context & long-form retrieval-augmented generation with key point recall. In Findings of the Association for Computational Linguistics: EMNLP 2024, pp. 4852–4872. Cited by: 5th item, 4th item, §6.2.1, §6.2.3, Table 7, Table 8.
- [413] (2024) Mooncake: a kvcache-centric disaggregated architecture for llm serving. arXiv preprint arXiv:2407.00079. Cited by: §5.2.3.
- [414] (2024) O1 replication journey: a strategic progress report–part 1. arXiv preprint arXiv:2410.18982. Cited by: §9.1.
- [415] (2024) Lightning attention-2: a free lunch for handling unlimited sequence lengths in large language models. External Links: 2401.04658, Link Cited by: §3.2.2.
- [416] (2024) Various lengths, constant speed: efficient language modeling with lightning attention. In ICML, Cited by: §3.2.3.
- [417] (2022) CosFormer: rethinking softmax in attention. In ICLR, Cited by: §3.2.2.
- [418] (2024) Clongeval: a chinese benchmark for evaluating long-context large language models. arXiv preprint arXiv:2403.03514. Cited by: 2nd item, 1st item, 2nd item, Table 7.
- [419] (2024) Language models can self-lengthen to generate long texts. arXiv preprint arXiv:2410.23933. Cited by: 2nd item, §6.2.1, Table 8.
- [420] (2024) Hellobench: evaluating long text generation capabilities of large language models. arXiv preprint arXiv:2409.16191. Cited by: §6.2.1, §6.2.3, §6.2.3, §6.2, Table 8, §9.4.
- [421] (2018) Improving language understanding by generative pre-training. Cited by: §3.2.2.
- [422] (2021) Scaling language models: methods, analysis & insights from training gopher. CoRR abs/2112.11446. External Links: 2112.11446, Link Cited by: §2.1.1.
- [423] (2020) Compressive transformers for long-range sequence modelling. In ICLR, Cited by: §3.2.1.
- [424] (2023) Direct preference optimization: your language model is secretly a reward model. ArXiv abs/2305.18290. External Links: Link Cited by: §2.2.2.
- [425] (2020) Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of machine learning research 21 (140), pp. 1–67. Cited by: §2.1.1, 1st item, 1st item, Table 3.
- [426] (2020) Deepspeed: system optimizations enable training deep learning models with over 100 billion parameters. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 3505–3506. Cited by: §5.1.
- [427] (2024) DocFinQA: A long-context financial reasoning dataset. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics, ACL 2024 - Short Papers, Bangkok, Thailand, August 11-16, 2024, L. Ku, A. Martins, and V. Srikumar (Eds.), pp. 445–458. External Links: Link Cited by: 1st item, Table 7, §8.7.
- [428] (2024) KV-compress: paged kv-cache compression with variable compression rates per attention head. arXiv preprint arXiv:2410.00161. Cited by: §5.2.2.
- [429] (2024) Samba: simple hybrid state space models for efficient unlimited context language modeling. External Links: 2406.07522, Link Cited by: §3.2.3, §3.2.3.
- [430] (2024) Needle threading: can llms follow threads through near-million-scale haystacks?. arXiv preprint arXiv:2411.05000. Cited by: 2nd item, Table 6.
- [431] (2024) Associative recurrent memory transformer. CoRR abs/2407.04841. Cited by: §3.2.1.
- [432] (2024) CLAPNQ: cohesive long-form answers from passages in natural questions for rag systems. arXiv preprint arXiv:2404.02103. Cited by: 4th item, §6.2.1, Table 8.
- [433] (2024) Defining and detecting vulnerability in human evaluation guidelines: a preliminary study towards reliable nlg evaluation. arXiv preprint arXiv:2406.07935. Cited by: §6.2.3.
- [434] (2023) Randomized positional encodings boost length generalization of transformers. arXiv preprint arXiv:2305.16843. Cited by: 2nd item, Table 4.
- [435] (2024) LMAct: A benchmark for in-context imitation learning with long multimodal demonstrations. CoRR abs/2412.01441. External Links: Document, 2412.01441, Link Cited by: §8.6.
- [436] (2023) Deepsearch: semantic search on multimedia sources like audio, video and images. GitHub. Note: https://github.com/deepsearch-ai/deepsearch External Links: Link Cited by: §8.2.
- [437] (2023) Token turing machines. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 19070–19081. Cited by: §4.2.
- [438] (2024) Benchmarking and building long-context retrieval models with loco and M2-BERT. In Forty-first International Conference on Machine Learning, ICML 2024, Vienna, Austria, July 21-27, 2024, External Links: Link Cited by: §8.5.
- [439] (2024) Triple preference optimization: achieving better alignment with less data in a single step optimization. External Links: 2405.16681 Cited by: §2.2.2.
- [440] (2022) BLOOM: a 176b-parameter open-access multilingual language model. ArXiv abs/2211.05100. Cited by: 2nd item.
- [441] (2023) Toolformer: language models can teach themselves to use tools. Neural Information Processing Systems. External Links: Document Cited by: §4.3.
- [442] (2021) Linear transformers are secretly fast weight programmers. In International conference on machine learning, pp. 9355–9366. Cited by: §3.2.2.
- [443] (2023) Memory augmented large language models are computationally universal. arXiv preprint arXiv: 2301.04589. External Links: Link Cited by: §4.2.
- [444] (2025) Flashattention-3: fast and accurate attention with asynchrony and low-precision. Advances in Neural Information Processing Systems 37, pp. 68658–68685. Cited by: §5.1.2, §9.3.
- [445] (2023) Zeroscrolls: a zero-shot benchmark for long text understanding. arXiv preprint arXiv:2305.14196. Cited by: Table 7.
- [446] (2024) TACO-rl: task aware prompt compression optimization with reinforcement learning. External Links: 2409.13035, Link Cited by: §4.1.1.
- [447] (1948) A mathematical theory of communication. The Bell system technical journal 27 (3), pp. 379–423. Cited by: §1.
- [448] (2024) A long-context language model for deciphering and generating bacteriophage genomes. Nature Communications 15 (1), pp. 9392. Cited by: §8.7.
- [449] (2024) Extensible embedding: A flexible multipler for llm’s context length. CoRR abs/2402.11577. Cited by: §3.2.1.
- [450] (2019) Long and diverse text generation with planning-based hierarchical variational model. arXiv preprint arXiv:1908.06605. Cited by: 2nd item.
- [451] (2024) Losing visual needles in image haystacks: vision language models are easily distracted in short and long contexts. In Findings of the Association for Computational Linguistics: EMNLP 2024, Miami, Florida, USA, November 12-16, 2024, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), pp. 5429–5451. External Links: Link Cited by: §8.6.
- [452] (2019) BIGPATENT: a large-scale dataset for abstractive and coherent summarization. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2204–2213. Cited by: 2nd item.
- [453] (2018) Self-attention with relative position representations. arXiv preprint arXiv:1803.02155. Cited by: §3.1.1, Table 3.
- [454] (2022) Multi-lexsum: real-world summaries of civil rights lawsuits at multiple granularities. Advances in Neural Information Processing Systems 35, pp. 13158–13173. Cited by: 2nd item.
- [455] (2021) Efficient attention: attention with linear complexities. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pp. 3531–3539. Cited by: §3.2.2.
- [456] (2023) Flexgen: high-throughput generative inference of large language models with a single gpu. In International Conference on Machine Learning, pp. 31094–31116. Cited by: §5.2.1, §5.2.4.
- [457] (2024) Compressing long context for enhancing RAG with amr-based concept distillation. CoRR abs/2405.03085. External Links: Link, Document, 2405.03085 Cited by: §8.2.
- [458] (2023) In-context pretraining: language modeling beyond document boundaries. ArXiv abs/2310.10638. Cited by: §2.1.3.
- [459] (2024) REPLUG: retrieval-augmented black-box language models. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), K. Duh, H. Gomez, and S. Bethard (Eds.), Mexico City, Mexico, pp. 8371–8384. External Links: Document, Link Cited by: §4.3.
- [460] (2023) Reflexion: language agents with verbal reinforcement learning. arXiv preprint arXiv: 2303.11366. Cited by: §4.2.
- [461] (2019) Megatron-lm: training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053. Cited by: §5.1.
- [462] (2023) RepoFusion: training code models to understand your repository. CoRR abs/2306.10998. External Links: Link, Document, 2306.10998 Cited by: §8.4.
- [463] (2023) Repository-level prompt generation for large language models of code. In International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, A. Krause, E. Brunskill, K. Cho, B. Engelhardt, S. Sabato, and J. Scarlett (Eds.), Proceedings of Machine Learning Research, Vol. 202, pp. 31693–31715. External Links: Link Cited by: §8.4.
- [464] (2024) GATEAU: selecting influential sample for long context alignment. Cited by: §2.2.1.
- [465] (2024) Loki: low-rank keys for efficient sparse attention. In Advances in Neural Information Processing Systems, A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang (Eds.), Vol. 37, pp. 16692–16723. External Links: Link Cited by: 5th item.
- [466] (2023) SlimPajama: A 627B token cleaned and deduplicated version of RedPajama. External Links: Link Cited by: §2.1.1, Table 2.
- [467] (2024) MileBench: benchmarking mllms in long context. CoRR abs/2404.18532. External Links: Document, 2404.18532, Link Cited by: §8.6.
- [468] (2023) Zebra: extending context window with layerwise grouped local-global attention. External Links: 2312.08618, Link Cited by: §3.2.1.
- [469] (2024) Counting-stars: a multi-evidence, position-aware, and scalable benchmark for evaluating long-context large language models. Preprint. Cited by: 2nd item.
- [470] (2024) Hierarchical context merging: better long context understanding for pre-trained llms. arXiv preprint arXiv:2404.10308. Cited by: §3.2.1.
- [471] (2025) Sparsified state-space models are efficient highway networks. arXiv preprint arXiv:2505.20698. Cited by: §3.2.2.
- [472] (2014) Effective multi-gpu communication using multiple cuda streams and threads. In 2014 20th IEEE International Conference on Parallel and Distributed Systems (ICPADS), pp. 981–986. Cited by: §5.1.3.
- [473] (2023) Structured packing in llm training improves long context utilization. arXiv preprint arXiv:2312.17296. Cited by: §5.1.1.
- [474] (2023) Structured packing in llm training improves long context utilization. ArXiv abs/2312.17296. Cited by: §2.1.3.
- [475] (2022) ASQA: factoid questions meet long-form answers. arXiv preprint arXiv:2204.06092. Cited by: 5th item, 4th item, §6.2.1, §6.2.3, Table 8.
- [476] (2024) Roformer: enhanced transformer with rotary position embedding. Neurocomputing 568, pp. 127063. Cited by: 3rd item, Table 3, §7.2.1, §7.2.1, §7.2.1.
- [477] (2023)Transformer 10(Website) External Links: Link Cited by: §7.2.1.
- [478] (2023)Transformer 12(Website) External Links: Link Cited by: 1st item, Table 4.
- [479] (2024) Transformer 17. Online Resource. External Links: 10040, Link Cited by: §8.6.
- [480] TriForce: lossless acceleration of long sequence generation with hierarchical speculative decoding. In First Conference on Language Modeling, Cited by: §5.2.5.
- [481] (2023) AdaPlanner: adaptive planning from feedback with language models. arXiv preprint arXiv: 2305.16653. Cited by: §4.2.
- [482] (2021) Do long-range language models actually use long-range context?. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp. 807–822. Cited by: §7.1.2.
- [483] (2023) PEARL: prompting large language models to plan and execute actions over long documents. Conference of the European Chapter of the Association for Computational Linguistics. External Links: Document Cited by: §4.4.
- [484] (2023) Is chatgpt good at search? investigating large language models as re-ranking agents. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, H. Bouamor, J. Pino, and K. Bali (Eds.), pp. 14918–14937. External Links: Link, Document Cited by: 3rd item, §8.2.
- [485] (2024) Learning to (learn at test time): rnns with expressive hidden states. arXiv preprint arXiv:2407.04620. Cited by: §3.2.2.
- [486] (2023) Retentive network: a successor to transformer for large language models. External Links: 2307.08621, Link Cited by: §3.2.2.
- [487] (2022) A length-extrapolatable transformer. arXiv preprint arXiv:2212.10554. Cited by: 3rd item, Table 3.
- [488] (2025) You only cache once: decoder-decoder architectures for language models. Advances in Neural Information Processing Systems 37, pp. 7339–7361. Cited by: 2nd item, §3.2.3.
- [489] (2018) Commonsenseqa: a question answering challenge targeting commonsense knowledge. arXiv preprint arXiv:1811.00937. Cited by: 5th item.
- [490] (2024) Proxyqa: an alternative framework for evaluating long-form text generation with large language models. arXiv preprint arXiv:2401.15042. Cited by: 4th item, §6.2.1, §6.2.3, Table 8, §9.4.
- [491] (2024) Towards general computer control: A multimodal agent for red dead redemption II as a case study. CoRR abs/2403.03186. External Links: Link, Document, 2403.03186 Cited by: §8.1.
- [492] (2020) Fourier features let networks learn high frequency functions in low dimensional domains. In Advances in Neural Information Processing Systems, H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (Eds.), Vol. 33, pp. 7537–7547. External Links: Link Cited by: §7.2.1.
- [493] (2024) Razorattention: efficient kv cache compression through retrieval heads. arXiv preprint arXiv:2407.15891. Cited by: §7.2.2.
- [494] (2025) RazorAttention: efficient KV cache compression through retrieval heads. In The Thirteenth International Conference on Learning Representations, External Links: Link Cited by: 4th item.
- [495] (2024) QUEST: query-aware sparsity for efficient long-context LLM inference. In Proceedings of the 41st International Conference on Machine Learning, R. Salakhutdinov, Z. Kolter, K. Heller, A. Weller, N. Oliver, J. Scarlett, and F. Berkenkamp (Eds.), Proceedings of Machine Learning Research, Vol. 235, pp. 47901–47911. External Links: Link Cited by: 2nd item.
- [496] (2024) LOGO - long context alignment via efficient preference optimization. ArXiv abs/2410.18533. Cited by: §2.2.2.
- [497] (2024) LOGO–long context alignment via efficient preference optimization. arXiv preprint arXiv:2410.18533. Cited by: §2.2.2, Table 2.
- [498] (2024) L-citeeval: do long-context models truly leverage context for responding?. External Links: 2410.02115 Cited by: Table 7.
- [499] (2020) Long range arena: a benchmark for efficient transformers. External Links: 2011.04006, Link Cited by: Table 6.
- [500] (2022) Transformer memory as a differentiable search index. arXiv preprint arXiv: 2202.06991. Cited by: §4.2.
- [501] (2025) Coze. Note: https://www.coze.cn/ Cited by: §8.1.
- [502] (2025) The innovation engine for genai applications. Note: https://dify.ai/ Cited by: §8.1.
- [503] (2024) Gemini 1.5: unlocking multimodal understanding across millions of tokens of context. arXiv preprint arXiv:2403.05530. Cited by: §1, §6.1.1, §7.1.1, §9.2.
- [504] (2024) Gemma 2: improving open language models at a practical size. arXiv preprint arXiv:2408.00118. Cited by: §3.2.3.
- [505] (2024) Jamba-1.5: hybrid transformer-mamba models at scale. arXiv preprint arXiv:2408.12570. Cited by: §3.2.3.
- [506] (2025) Kimi k1. 5: scaling reinforcement learning with llms. arXiv preprint arXiv:2501.12599. Cited by: §9.1.
- [507] (2025) SuperGPQA: scaling llm evaluation across 285 graduate disciplines. Cited by: §1.
- [508] (2025) Leave it to manus. Note: https://manus.im/ Cited by: §8.1.
- [509] (2025) Computer-using agent. Note: https://openai.com/index/computer-using-agent/ Cited by: §8.1.
- [510] (2025) Introducing deep research. Note: https://openai.com/index/introducing-deep-research/ Cited by: §1, §9.2.
- [511] (2025) Qwen2.5-vl. External Links: Link Cited by: §1, §9.2.
- [512] (2024) Untie the knots: an efficient data augmentation strategy for long-context pre-training in language models. arXiv preprint arXiv:2409.04774. Cited by: §2.1.3.
- [513] (2024) Distance between relevant information pieces causes bias in long-context llms. arXiv preprint arXiv:2410.14641. Cited by: Table 6.
- [514] (2023) D4: improving LLM pretraining via document de-duplication and diversification. CoRR abs/2308.12284. External Links: Document, 2308.12284, Link Cited by: §2.1.1.
- [515] (2023) Llama: open and efficient foundation language models. arXiv preprint arXiv:2302.13971. Cited by: 3rd item, §3.2.1, §7.1.1.
- [516] (2025) Longwriter-v: enabling ultra-long and high-fidelity generation in vision-language models. arXiv preprint arXiv:2502.14834. Cited by: §8.6.
- [517] (2024) FastVLM: efficient vision encoding for vision language models. CoRR abs/2412.13303. External Links: Document, 2412.13303, Link Cited by: §8.6.
- [518] (2017) Attention is all you need. In NIPS, pp. 5998–6008. Cited by: 1st item, 1st item, §3.2.1, Table 3.
- [519] (2024) CollabStory: multi-llm collaborative story generation and authorship analysis. arXiv preprint arXiv:2406.12665. Cited by: §6.2.
- [520] (2024) Michelangelo: long context evaluations beyond haystacks via latent structure queries. arXiv preprint arXiv:2409.12640. Cited by: Table 6.
- [521] (2018) Improving spiking dynamical networks: accurate delays, higher-order synapses, and time cells. Neural Comput. 30 (3). Cited by: §3.2.2.
- [522] (2024) Neurons in large language models: dead, n-gram, positional. In Findings of the Association for Computational Linguistics: ACL 2024, L. Ku, A. Martins, and V. Srikumar (Eds.), Bangkok, Thailand, pp. 1288–1301. External Links: Document, Link Cited by: §7.2.2, §9.5.
- [523] (2024) An empirical study of mamba-based language models. arXiv preprint arXiv:2406.07887. Cited by: §3.2.3.
- [524] (2022) SQuALITY: building a long-document summarization dataset the hard way. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pp. 1139–1156. Cited by: 2nd item.
- [525] (2019) Encoding word order in complex embeddings. arXiv preprint arXiv:1912.12333. Cited by: 2nd item, Table 3.
- [526] (2024) Teaching code llms to use autocompletion tools in repository-level code generation. arXiv preprint arXiv:2401.06391. Cited by: §6.2.
- [527] (2024) Ada-leval: evaluating long-context llms with length-adaptable benchmarks. External Links: 2404.06480 Cited by: Table 6.
- [528] (2023) Voyager: an open-ended embodied agent with large language models. arXiv preprint arXiv: 2305.16291. Cited by: §4.2.
- [529] (2024) When precision meets position: bfloat16 breaks down rope in long-context training. arXiv preprint arXiv:2411.13476. Cited by: §5.1.2.
- [530] (2024) Multimodal needle in a haystack: benchmarking long-context capability of multimodal large language models. CoRR abs/2406.11230. External Links: Document, 2406.11230, Link Cited by: §8.6.
- [531] (2024) DRT-o1: optimized deep reasoning translation via long chain-of-thought. arXiv preprint arXiv:2412.17498. Cited by: §9.1.
- [532] (2023) Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 Small. In The Eleventh International Conference on Learning Representations, External Links: Link Cited by: §7.2.2, §9.5.
- [533] (2024) Mathhay: an automated benchmark for long-context mathematical reasoning in llms. arXiv preprint arXiv:2410.04698. Cited by: Table 6.
- [534] (2023) A survey on large language model based autonomous agents. Frontiers Comput. Sci.. External Links: Document Cited by: §4.4.
- [535] (2024) Improving text embeddings with large language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), ACL 2024, Bangkok, Thailand, August 11-16, 2024, L. Ku, A. Martins, and V. Srikumar (Eds.), pp. 11897–11916. External Links: Link, Document Cited by: §8.5.
- [536] (2024) Large search model: redefining search stack in the era of llms. In ACM SIGIR Forum, Vol. 57, pp. 1–16. Cited by: §1, 3rd item.
- [537] (2023) Query2doc: query expansion with large language models. Conference on Empirical Methods in Natural Language Processing. External Links: Document Cited by: §4.3.
- [538] (2024) Benchmarking and improving long-text translation with large language models. In Findings of the Association for Computational Linguistics, ACL 2024, Bangkok, Thailand and virtual meeting, August 11-16, 2024, L. Ku, A. Martins, and V. Srikumar (Eds.), pp. 7175–7187. External Links: Link, Document Cited by: §8.5.
- [539] (2023) Document-level machine translation with large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, H. Bouamor, J. Pino, and K. Bali (Eds.), pp. 16646–16661. External Links: Link, Document Cited by: §8.5.
- [540] (2024) Leave no document behind: benchmarking long-context llms with extended multi-doc qa. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. 5627–5646. Cited by: 3rd item, Table 7.
- [541] (2024) Qwen2-vl: enhancing vision-language model’s perception of the world at any resolution. arXiv preprint arXiv:2409.12191. Cited by: §8.6.
- [542] (2020) Linformer: self-attention with linear complexity. External Links: 2006.04768, Link Cited by: §3.2.1.
- [543] (2024) Resonance rope: improving context length generalization of large language models. arXiv preprint arXiv:2403.00071. Cited by: 2nd item, Table 4.
- [544] (2024) Weaver: foundation models for creative writing. External Links: 2401.17268, Link Cited by: §2.2.2.
- [545] (2024) A study of extractive summarization of long documents incorporating local topic and hierarchical information. Scientific Reports 14 (1), pp. 10140. Cited by: §8.5.
- [546] (2023) Augmenting language models with long-term memory. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023, A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (Eds.), External Links: Link Cited by: §4.2, §8.3.
- [547] (2024) LongLLaVA: scaling multi-modal llms to 1000 images efficiently via hybrid architecture. CoRR abs/2409.02889. External Links: Document, 2409.02889, Link Cited by: §8.6.
- [548] (2024) Beyond the limits: A survey of techniques to extend the context length in large language models. In Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence, IJCAI 2024, Jeju, South Korea, August 3-9, 2024, pp. 8299–8307. External Links: Link Cited by: §8.3.
- [549] (2024) Openhands: an open platform for ai software developers as generalist agents. In The Thirteenth International Conference on Learning Representations, Cited by: §8.1.
- [550] (2024) RepoTransBench: a real-world benchmark for repository-level code translation. arXiv preprint arXiv:2412.17744. Cited by: 6th item.
- [551] (2024) MEMORYLLM: towards self-updatable large language models. In Forty-first International Conference on Machine Learning, ICML 2024, Vienna, Austria, July 21-27, 2024, External Links: Link Cited by: §4.2.
- [552] (2023) RoleLLM: benchmarking, eliciting, and enhancing role-playing abilities of large language models. arXiv preprint arXiv: 2310.00746. Cited by: §1.
- [553] (2025) MMLongBench: benchmarking long-context vision-language models effectively and thoroughly. arXiv preprint arXiv:2505.10610. Cited by: §8.6.
- [554] (2024) VideoTree: adaptive tree-based video representation for LLM reasoning on long videos. CoRR abs/2405.19209. External Links: Document, 2405.19209, Link Cited by: §8.6.
- [555] (2024) Smarter, better, faster, longer: a modern bidirectional encoder for fast, memory efficient, and long context finetuning and inference. arXiv preprint arXiv: 2412.13663. External Links: Link Cited by: §4.3.
- [556] (2024) Long-form factuality in large language models. arXiv preprint arXiv:2403.18802. Cited by: 3rd item, §6.2.1, Table 8, §9.4.
- [557] (2024) Longvlm: efficient long video understanding via large language models. In European Conference on Computer Vision, pp. 453–470. Cited by: §1.
- [558] (2015) Towards ai-complete question answering: a set of prerequisite toy tasks. arXiv preprint arXiv:1502.05698. Cited by: 2nd item.
- [559] (2023) Printing press. External Links: Link Cited by: §1.
- [560] (2024) Chinese astronomy. External Links: Link Cited by: §1.
- [561] (2024) Library of Alexandria. External Links: Link Cited by: §1.
- [562] (2022) Prompt compression and contrastive conditioning for controllability and toxicity reduction in language models. In Findings of the Association for Computational Linguistics: EMNLP 2022, Y. Goldberg, Z. Kozareva, and Y. Zhang (Eds.), Abu Dhabi, United Arab Emirates, pp. 5621–5634. External Links: Link, Document Cited by: §4.1.2.
- [563] (2017) Challenges in data-to-document generation. arXiv preprint arXiv:1707.08052. Cited by: §6.2.
- [564] (2024) Loongserve: efficiently serving long-context large language models with elastic sequence parallelism. In Proceedings of the ACM SIGOPS 30th Symposium on Operating Systems Principles, pp. 640–654. Cited by: §5.2.3.
- [565] (2021) Hi-transformer: hierarchical interactive transformer for efficient and effective long document modeling. In ACL/IJCNLP (2), pp. 848–853. Cited by: §3.2.1.
- [566] (2024) LongMemEval: benchmarking chat assistants on long-term interactive memory. arXiv preprint arXiv:2410.10813. External Links: Link Cited by: Table 7.
- [567] (2023) VCSUM: a versatile chinese meeting summarization dataset. In Findings of the Association for Computational Linguistics: ACL 2023, pp. 6065–6079. Cited by: 2nd item.
- [568] (2024) LongVideoBench: A benchmark for long-context interleaved video-language understanding. CoRR abs/2407.15754. External Links: Document, 2407.15754, Link Cited by: §8.6.
- [569] (2025) LongAttn: selecting long-context training data via token-level attention. arXiv preprint arXiv:2502.16860. Cited by: §2.1.1, §2.2.1, Table 2, §9.2.
- [570] (2020) Memformer: the memory-augmented transformer. CoRR abs/2010.06891. External Links: 2010.06891, Link Cited by: §3.2.1.
- [571] An efficient recipe for long context extension via middle-focused positional encoding. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, Cited by: 2nd item, Table 4.
- [572] (2024) Long context alignment with short instructions and synthesized positions. arXiv preprint arXiv:2405.03939. Cited by: 2nd item, Table 4.
- [573] (2025) Retrieval head mechanistically explains long-context factuality. In The Thirteenth International Conference on Learning Representations, External Links: Link Cited by: §7.2.2, §9.5.
- [574] (2024) TableBench: a comprehensive and complex benchmark for table question answering. arXiv preprint arXiv:2408.09174. Cited by: §1.
- [575] (2024) LIFBench: evaluating the instruction following performance and stability of large language models in long-context scenarios. arXiv preprint arXiv:2411.07037. Cited by: Table 6.
- [576] (2024) LongGenBench: benchmarking long-form generation in long context llms. arXiv preprint arXiv:2409.02076. Cited by: 3rd item, 3rd item, §6.2.1, Table 8, footnote 6.
- [577] (2022) Memorizing transformers. In ICLR, Cited by: §3.2.1.
- [578] (2025) When more is less: understanding chain-of-thought length in llms. arXiv preprint arXiv:2502.07266. Cited by: §9.1.
- [579] (2024) COAT: compressing optimizer states and activation for memory-efficient fp8 training. arXiv preprint arXiv:2410.19313. Cited by: §5.1.2.
- [580] (2023) The rise and potential of large language model based agents: a survey. arXiv preprint arXiv: 2309.07864. Cited by: §4.4.
- [581] (2023) The rise and potential of large language model based agents: A survey. CoRR abs/2309.07864. External Links: Link, Document, 2309.07864 Cited by: §8.1.
- [582] (2024) Agentless: demystifying llm-based software engineering agents. CoRR abs/2407.01489. External Links: Link, Document, 2407.01489 Cited by: §8.1.
- [583] (2025) TokenSkip: controllable chain-of-thought compression in llms. arXiv preprint arXiv:2502.12067. Cited by: §9.1.
- [584] (2024) Unlocking efficiency in large language model inference: a comprehensive survey of speculative decoding. In ACL (Findings), Cited by: §5.2.5.
- [585] (2024) LESS: selecting influential data for targeted instruction tuning. In International Conference on Machine Learning (ICML), Cited by: §2.2.1.
- [586] (2023) Smoothquant: accurate and efficient post-training quantization for large language models. In International Conference on Machine Learning, pp. 38087–38099. Cited by: §5.1.2, §5.2.1.
- [587] (2024) DuoAttention: efficient long-context llm inference with retrieval and streaming heads. External Links: 2410.10819, Link Cited by: 4th item.
- [588] (2024) Efficient streaming language models with attention sinks. In The Twelfth International Conference on Learning Representations, External Links: Link Cited by: §7.2.2.
- [589] (2024) Efficient streaming language models with attention sinks. In ICLR, Cited by: 1st item, §3.2.1.
- [590] (2024) OSWorld: benchmarking multimodal agents for open-ended tasks in real computer environments. In Advances in Neural Information Processing Systems 38: Annual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 - 15, 2024, A. Globersons, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. M. Tomczak, and C. Zhang (Eds.), External Links: Link Cited by: §8.1.
- [591] (2024) Effective long-context scaling of foundation models. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), K. Duh, H. Gomez, and S. Bethard (Eds.), Mexico City, Mexico, pp. 4643–4663. External Links: Document, Link Cited by: §2.2.2.
- [592] (2023) Effective long-context scaling of foundation models. arXiv preprint arXiv:2309.16039. Cited by: 2nd item, Table 4.
- [593] (2021) Nyströmformer: A nyström-based algorithm for approximating self-attention. In AAAI, pp. 14138–14148. Cited by: §3.2.2.
- [594] (2024) From artificial needles to real haystacks: improving retrieval capabilities in llms by finetuning on synthetic data. arXiv preprint arXiv:2406.19292. Cited by: 2nd item.
- [595] (2023) RECOMP: improving retrieval-augmented lms with compression and selective augmentation. arXiv preprint arXiv: 2310.04408. Cited by: §4.3.
- [596] (2023) A critical evaluation of evaluations for long-form question answering. arXiv preprint arXiv:2305.18201. Cited by: §6.2.3.
- [597] (2024) Vtensor: flexible virtual tensor management for efficient llm serving. arXiv preprint arXiv:2407.15309. Cited by: §5.2.2.
- [598] (2024) ChatQA 2: bridging the gap to proprietary llms in long context and rag capabilities. ArXiv abs/2407.14482. External Links: Link Cited by: §2.2.2, Table 2.
- [599] (2024) Stress-testing long-context language models with lifelong icl and task haystack. In The Thirty-eight Conference on Neural Information Processing Systems Datasets and Benchmarks Track, Cited by: 5th item.
- [600] (2024) Detectiveqa: evaluating long-context reasoning on detective novels. arXiv preprint arXiv:2409.02465. Cited by: Table 7.
- [601] (2024) Hetegen: efficient heterogeneous parallel inference for large language models on resource-constrained devices. Proceedings of Machine Learning and Systems 6, pp. 162–172. Cited by: §5.2.4.
- [602] (2024) LongVILA: scaling long-context visual language models for long videos. CoRR abs/2408.10188. External Links: Link, Document, 2408.10188 Cited by: §8.6.
- [603] (2023) Baichuan 2: open large-scale language models. ArXiv abs/2309.10305. Cited by: 2nd item.
- [604] (2025) Qwen2. 5-1m technical report. arXiv preprint arXiv:2501.15383. Cited by: §1, 3rd item, §5.1.1.
- [605] (2025) Rope to nope and back again: a new hybrid attention strategy. External Links: 2501.18795, Link Cited by: §7.2.3.
- [606] (2025) LongFaith: enhancing long-context reasoning in llms with faithful synthetic data. arXiv preprint arXiv:2502.12583. Cited by: Table 2.
- [607] (2024) PyramidInfer: pyramid KV cache compression for high-throughput LLM inference. In Findings of the Association for Computational Linguistics: ACL 2024, L. Ku, A. Martins, and V. Srikumar (Eds.), Bangkok, Thailand, pp. 3258–3270. External Links: Link, Document Cited by: 3rd item.
- [608] (2024) Evaluating and aligning codellms on human preference. arXiv preprint arXiv:2412.05210. Cited by: §1.
- [609] (2024) Execrepobench: multi-level executable code completion evaluation. arXiv preprint arXiv:2412.11990. Cited by: §1.
- [610] (2024) SWE-agent: agent-computer interfaces enable automated software engineering. In Advances in Neural Information Processing Systems 38: Annual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 - 15, 2024, A. Globersons, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. M. Tomczak, and C. Zhang (Eds.), External Links: Link Cited by: §8.1.
- [611] (2022) Re3: generating longer stories with recursive reprompting and revision. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, Y. Goldberg, Z. Kozareva, and Y. Zhang (Eds.), pp. 4393–4479. External Links: Document, Link Cited by: §4.4.
- [612] (2024) TidalDecode: fast and accurate llm decoding with position persistent sparse attention. External Links: 2410.05076, Link Cited by: 3rd item.
- [613] (2024) VisionZip: longer is better but not necessary in vision language models. CoRR abs/2412.04467. External Links: Document, 2412.04467, Link Cited by: §8.6.
- [614] (2025) Towards thinking-optimal scaling of test-time compute for llm reasoning. arXiv preprint arXiv:2502.18080. Cited by: §9.1.
- [615] (2015) Wikiqa: a challenge dataset for open-domain question answering. In Proceedings of the 2015 conference on empirical methods in natural language processing, pp. 2013–2018. Cited by: 1st item.
- [616] (2024) VCA: video curious agent for long video understanding. CoRR abs/2412.10471. External Links: Document, 2412.10471, Link Cited by: §8.6.
- [617] (2018) HotpotQA: a dataset for diverse, explainable multi-hop question answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 2369–2380. Cited by: 1st item, 4th item.
- [618] (2016) Hierarchical attention networks for document classification. In HLT-NAACL, pp. 1480–1489. Cited by: §3.2.1.
- [619] (2023) ReAct: synergizing reasoning and acting in language models. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023, External Links: Link Cited by: §8.1.
- [620] (2022) Zeroquant: efficient and affordable post-training quantization for large-scale transformers. Advances in Neural Information Processing Systems 35, pp. 27168–27183. Cited by: §5.2.1.
- [621] (2024) MPLUG-owl3: towards long image-sequence understanding in multi-modal large language models. CoRR abs/2408.04840. External Links: Document, 2408.04840, Link Cited by: §8.6.
- [622] (2024) Data mixing laws: optimizing data mixtures by predicting language modeling performance. arXiv preprint arXiv:2403.16952. Cited by: §2.1.2.
- [623] (2024) ChunkAttention: efficient self-attention with prefix-aware kv cache and two-phase partition. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 11608–11620. Cited by: §5.2.2.
- [624] (2025) LongProc: benchmarking long-context language models on long procedural generation. arXiv preprint arXiv:2501.05414. Cited by: §6.2.1, Table 8.
- [625] (2024) Helmet: how to evaluate long-context language models effectively and thoroughly. arXiv preprint arXiv:2410.02694. Cited by: 3rd item, 4th item, Table 7.
- [626] (2024) T2Vid: translating long text into multi-image is the catalyst for video-llms. CoRR abs/2411.19951. External Links: Link, Document, 2411.19951 Cited by: §8.6.
- [627] (2024) CompAct: compressing retrieved documents actively for question answering. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), Miami, Florida, USA, pp. 21424–21439. External Links: Link, Document Cited by: §4.1.1.
- [628] (2024) Twinpilots: a new computing paradigm for gpu-cpu parallel llm inference. In Proceedings of the 17th ACM International Systems and Storage Conference, pp. 91–103. Cited by: §5.2.4.
- [629] (2023) TRAMS: training-free memory selection for long-range language modeling. In EMNLP (Findings), pp. 4966–4972. Cited by: §3.2.1.
- [630] (2024) Frame-voyager: learning to query frames for video large language models. CoRR abs/2410.03226. External Links: Document, 2410.03226, Link Cited by: §8.6.
- [631] (2024) In defense of RAG in the era of long-context language models. CoRR abs/2409.01666. External Links: Link, Document, 2409.01666 Cited by: §8.2.
- [632] (2024) Collage: light-weight low-precision strategy for llm training. arXiv preprint arXiv:2405.03637. Cited by: §5.1.2.
- [633] (2022) Wordcraft: story writing with large language models. In Proceedings of the 27th International Conference on Intelligent User Interfaces, pp. 841–852. Cited by: §6.2.
- [634] (2025) ReMamba: equip mamba with effective long-sequence modeling. External Links: 2408.15496, Link Cited by: §3.2.2.
- [635] (2025) Native sparse attention: hardware-aligned and natively trainable sparse attention. arXiv preprint arXiv:2502.11089. Cited by: §5.1.2.
- [636] (2024) LV-eval: a balanced long-context benchmark with 5 length levels up to 256k. External Links: 2402.05136 Cited by: Table 7.
- [637] (2024) Wkvquant: quantizing weight and key/value cache for large language models gains more. arXiv preprint arXiv:2402.12065. Cited by: §5.2.1.
- [638] (2020) Big bird: transformers for longer sequences. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, H. Larochelle, M. Ranzato, R. Hadsell, M. Balcan, and H. Lin (Eds.), External Links: Link Cited by: §8.5.
- [639] (2022) Socratic models: composing zero-shot multimodal reasoning with language. International Conference on Learning Representations. External Links: Document Cited by: §4.2.
- [640] (2025) Revisiting the test-time scaling of o1-like models: do they truly possess test-time scaling capabilities?. arXiv preprint arXiv:2502.12215. Cited by: §9.1.
- [641] (2025) CodeCriticBench: a holistic code critique benchmark for large language models. Cited by: §1.
- [642] (2023) RepoCoder: repository-level code completion through iterative retrieval and generation. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023, Singapore, December 6-10, 2023, H. Bouamor, J. Pino, and K. Bali (Eds.), pp. 2471–2484. External Links: Link, Document Cited by: §4.3, 6th item, §8.4.
- [643] (2024) Map-neo: highly capable and transparent bilingual large language model series. arXiv preprint arXiv:2405.19327. Cited by: §1, §2.1.1.
- [644] (2018) Improving the transformer translation model with document-level context. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, E. Riloff, D. Chiang, J. Hockenmaier, and J. Tsujii (Eds.), pp. 533–542. External Links: Link, Document Cited by: §8.5.
- [645] (2024) Longcite: enabling llms to generate fine-grained citations in long-context qa. arXiv preprint arXiv:2409.02897. Cited by: Table 7.
- [646] (2024) LongReward: improving long-context large language models with ai feedback. arXiv preprint arXiv:2410.21252. Cited by: §2.2.2, Table 2.
- [647] (2020) PEGASUS: pre-training with extracted gap-sentences for abstractive summarization. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, Proceedings of Machine Learning Research, Vol. 119, pp. 11328–11339. External Links: Link Cited by: §8.5.
- [648] (2025) LightThinker: thinking step-by-step compression. arXiv preprint arXiv:2502.15589. Cited by: §9.1.
- [649] (2024) Draft& verify: lossless large language model acceleration via self-speculative decoding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), L. Ku, A. Martins, and V. Srikumar (Eds.), Cited by: §5.2.5.
- [650] (2024) HiRoPE: length extrapolation for code models using hierarchical position. arXiv preprint arXiv:2403.19115. Cited by: 1st item, Table 4.
- [651] (2024) Marathon: a race through the realm of long context with large language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 5201–5217. Cited by: 3rd item, Table 7.
- [652] (2024) InternLM-xcomposer-2.5: A versatile large vision language model supporting long-contextual input and output. CoRR abs/2407.03320. External Links: Document, 2407.03320, Link Cited by: §8.6.
- [653] (2025) Long context compression with activation beacon. In The Thirteenth International Conference on Learning Representations, External Links: Link Cited by: §4.1.2.
- [654] (2025) Finefilter: a fine-grained noise filtering mechanism for retrieval-augmented large language models. arXiv preprint arXiv:2502.11811. Cited by: §4.3.
- [655] (2024) AdaComp: extractive context compression with adaptive predictor for retrieval-augmented large language models. External Links: 2409.01579, Link Cited by: §4.1.1.
- [656] (2022) OPT: open pre-trained transformer language models. External Links: 2205.01068, Link Cited by: 2nd item.
- [657] (2019) Bertscore: evaluating text generation with bert. arXiv preprint arXiv:1904.09675. Cited by: 1st item.
- [658] (2024) Kv cache is 1 bit per channel: efficient large language model inference with coupled quantization. Advances in Neural Information Processing Systems 37, pp. 3304–3331. Cited by: §5.2.1.
- [659] (2025) Test-time training done right. arXiv preprint arXiv:2505.23884. Cited by: §3.2.2.
- [660] (2024) Interpreting and improving large language models in arithmetic calculation. In Proceedings of the 41st International Conference on Machine Learning, R. Salakhutdinov, Z. Kolter, K. Heller, A. Weller, N. Oliver, J. Scarlett, and F. Berkenkamp (Eds.), Proceedings of Machine Learning Research, Vol. 235, pp. 59932–59950. External Links: Link Cited by: §7.2.2, §9.5.
- [661] (2024) TableLLM: enabling tabular data manipulation by llms in real office usage scenarios. arXiv preprint arXiv:2403.19318. Cited by: 1st item.
- [662] (2019) HIBERT: document level pre-training of hierarchical bidirectional transformers for document summarization. In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, A. Korhonen, D. R. Traum, and L. Màrquez (Eds.), pp. 5059–5069. External Links: Link, Document Cited by: §8.5.
- [663] (2024) Extending long context evaluation beyond 100k tokens. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 15262–15277. Cited by: 2nd item, 2nd item, 6th item, Table 7.
- [664] (2025) LightTransfer: your long-context LLM is secretly a hybrid model with effortless adaptation. In Workshop on Reasoning and Planning for Large Language Models, External Links: Link Cited by: 3rd item.
- [665] (2024) AutoCodeRover: autonomous program improvement. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2024, Vienna, Austria, September 16-20, 2024, M. Christakis and M. Pradel (Eds.), pp. 1592–1604. External Links: Link, Document Cited by: §8.1.
- [666] (2024) Chain of agents: large language models collaborating on long-context tasks. arXiv preprint arXiv: 2406.02818. Cited by: §4.4.
- [667] (2024) O1-coder: an o1 replication for coding. arXiv preprint arXiv:2412.00154. Cited by: §9.1.
- [668] (2024) Found in the middle: how language models use long contexts better via plug-and-play positional encoding. arXiv preprint arXiv:2403.04797. Cited by: 2nd item, Table 4.
- [669] (2023) H2O: heavy-hitter oracle for efficient generative inference of large language models. In Advances in Neural Information Processing Systems, A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (Eds.), Vol. 36, pp. 34661–34710. External Links: Link Cited by: 2nd item.
- [670] (2024) Analyzing temporal complex events with large language models? a benchmark towards temporal, long context understanding. arXiv preprint arXiv:2406.02472. Cited by: Table 7.
- [671] (2025) DeepGEMM: clean and efficient fp8 gemm kernels with fine-grained scaling. GitHub. Note: https://github.com/deepseek-ai/DeepGEMM Cited by: §5.1.2.
- [672] (2023) Goldminer: elastic scaling of training data pre-processing pipelines for deep learning. Proceedings of the ACM on Management of Data 1 (2), pp. 1–25. Cited by: §5.1.1.
- [673] (2024) LongAgent: scaling language models to 128k context through multi-agent collaboration. arXiv preprint arXiv: 2402.11550. Cited by: §4.4.
- [674] (2024) Length extrapolation of transformers: a survey from the perspective of positional encoding. In Findings of the Association for Computational Linguistics: EMNLP 2024, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), Miami, Florida, USA, pp. 9959–9977. External Links: Link, Document Cited by: Table 1.
- [675] (2024) Longskywork: a training recipe for efficiently extending context length in large language models. arXiv preprint arXiv:2406.00605. Cited by: §5.1.1.
- [676] (2024) OmChat: A recipe to train multimodal language models with strong long context and video understanding. CoRR abs/2407.04923. External Links: Document, 2407.04923, Link Cited by: §8.6.
- [677] (2023) Pytorch fsdp: experiences on scaling fully sharded data parallel. arXiv preprint arXiv:2304.11277. Cited by: §5.1.
- [678] (2024) Atom: low-bit quantization for efficient and accurate llm serving. Proceedings of Machine Learning and Systems 6, pp. 196–209. Cited by: §5.2.1.
- [679] (2024) Marco-o1: towards open reasoning models for open-ended solutions. arXiv preprint arXiv:2411.14405. Cited by: §9.1.
- [680] (2025) DAPE: data-adaptive positional encoding for length extrapolation. Advances in Neural Information Processing Systems 37, pp. 26659–26700. Cited by: 2nd item, §3.1.1, Table 3.
- [681] (2024) DAPE v2: process attention score as feature map for length extrapolation. arXiv preprint arXiv:2410.04798. Cited by: 2nd item, Table 3.
- [682] (2023) Judging llm-as-a-judge with mt-bench and chatbot arena. Advances in Neural Information Processing Systems 36, pp. 46595–46623. Cited by: §6.2.3.
- [683] (2023) Efficiently programming large language models using sglang.. Cited by: §5.2.2.
- [684] (2021) QMSum: a new benchmark for query-based multi-domain meeting summarization. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 5905–5921. Cited by: 2nd item.
- [685] (2024) MemoryBank: enhancing large language models with long-term memory. In Thirty-Eighth AAAI Conference on Artificial Intelligence, AAAI 2024, Thirty-Sixth Conference on Innovative Applications of Artificial Intelligence, IAAI 2024, Fourteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2014, February 20-27, 2024, Vancouver, Canada, M. J. Wooldridge, J. G. Dy, and S. Natarajan (Eds.), pp. 19724–19731. External Links: Link, Document Cited by: §4.2, §8.3.
- [686] (2024) distserve: Disaggregating prefill and decoding for goodput-optimized large language model serving. In 18th USENIX Symposium on Operating Systems Design and Implementation (OSDI 24), pp. 193–210. Cited by: §5.2.3.
- [687] (2024) MLVU: A comprehensive benchmark for multi-task long video understanding. CoRR abs/2406.04264. External Links: Document, 2406.04264, Link Cited by: §8.6.
- [688] (2024) WebArena: A realistic web environment for building autonomous agents. In The Twelfth International Conference on Learning Representations, ICLR 2024, Vienna, Austria, May 7-11, 2024, External Links: Link Cited by: §8.1.
- [689] (2023) Efficient prompting via dynamic in-context learning. External Links: 2305.11170, Link Cited by: 1st item, §4.1.1.
- [690] (2023) RecurrentGPT: interactive generation of (arbitrarily) long text. arXiv preprint arXiv: 2305.13304. Cited by: §4.2, §4.4, footnote 1.
- [691] (2023) Agents: an open-source framework for autonomous language agents. CoRR abs/2309.07870. External Links: Link, Document, 2309.07870 Cited by: §8.1.
- [692] (2024) Symbolic learning enables self-evolving agents. CoRR abs/2406.18532. External Links: Link, Document, 2406.18532 Cited by: §8.1.
- [693] (2025) DynamicKV: task-aware adaptive kv cache compression for long context llms. External Links: 2412.14838, Link Cited by: 3rd item.
- [694] (2024) Scaling behavior for large language models regarding numeral systems: an example using pythia. In Findings of the Association for Computational Linguistics: EMNLP 2024, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), Miami, Florida, USA, pp. 3806–3820. External Links: Document, Link Cited by: §9.5.
- [695] (2025) DocLens: a tool-augmented multi-agent framework for long visual document understanding. arXiv preprint arXiv:2511.11552. Cited by: §8.2.
- [696] (2024) LongEmbed: extending embedding models for long context retrieval. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, EMNLP 2024, Miami, FL, USA, November 12-16, 2024, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), pp. 802–816. External Links: Link Cited by: §8.5.
- [697] (2024) LongEmbed: extending embedding models for long context retrieval. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), Miami, Florida, USA, pp. 802–816. External Links: Document, Link Cited by: 2nd item.
- [698] (2023) PoSE: efficient context window extension of llms via positional skip-wise training. In The Twelfth International Conference on Learning Representations, Cited by: 2nd item, Table 4, §6.1.1.
- [699] (2025) PSC: extending context window of large language models via phase shift calibration. arXiv preprint arXiv:2505.12423. Cited by: 2nd item.
- [700] (2024) FocusLLaVA: A coarse-to-fine approach for efficient and effective visual token compression. CoRR abs/2411.14228. External Links: Document, 2411.14228, Link Cited by: §8.6.
- [701] (2023) Large language models for information retrieval: A survey. CoRR abs/2308.07107. External Links: Link, Document, 2308.07107 Cited by: §8.5.
- [702] (2024) GPTSwarm: language agents as optimizable graphs. In Forty-first International Conference on Machine Learning, ICML 2024, Vienna, Austria, July 21-27, 2024, External Links: Link Cited by: §8.1.
- [703] (2025) HLV-1k: a large-scale hour-long video benchmark for time-specific long video understanding. CoRR abs/2501.01645. External Links: Document, 2501.01645, Link Cited by: §8.6.
- [704] (2024) Retrieval or global context understanding? on many-shot in-context learning for long-context evaluation. arXiv preprint arXiv:2411.07130. Cited by: Table 7.