cs.AINov 3, 2026
SaveYou don't need long context
Abstract
Later tokens are costlier to generate than earlier tokens. On frontier open weight models, the disparity in cost may rise to as much as 7x. Through frequent compaction, we show across a broad range of long-horizon and long-input tasks that frontier language models sacrifice little to no task accuracy when maintaining short contexts. We further demonstrate that LLM performance does not collapse on long-horizon software engineering tasks even when taking at most one action per context, and based on that we outline the concept of semantic state space models (SSSMs). Our findings question the need for long-context language models.
Figures & tables
Figure 1: The cost of long context. Dollar cost of generating M output tokens on an existing input KV cache as a function of the context window size, obtained by converting the measured peak decode throughput of each deployment at on-demand H100 prices ( \3.85256163.6\times5.6\times7\times$ more for Qwen.
Figure 2: The burden of long context. The token generation latency, token throughput, and memory footprint of several open-source models measured on an NVIDIA DGX Spark plotted as a function of input context length. For several models, later tokens take approximately 2x longer to generate than earlier tokens and require a larger memory footprint.
| Literary works | Model context window sizes | ||||
| Work | Words | Tokens | Model | Words | Tokens |
| The Old Man and the Sea [ 21 ] | K | K | MiniMax M2.7 [ 31 ] | K | K |
| The Great Gatsby [ 15 ] | K | K | Claude Opus 4.5 [ 2 ] | K | K |
| Qur’an (Saheeh Int’l translation) [ 38 ] | K | K | Gemma 4 31B [ 16 ] | K | K |
| King James New Testament [ 26 ] | K | K | Kimi K2.6 [ 32 ] | K | K |
| Great Expectations [ 12 ] | K | K | Qwen 3 Coder Next [ 9 ] | K | K |
Table 1: Lengths of literary works against model context window sizes. Word counts use the cited English editions. Word-token conversions use approximately tokens per English word, while actual counts vary with text and tokenizer. Models and their context window sizes are detailed in Section 2.3 .
Figure 3: Context-management regimes. The three context-management regimes considered in this work: Full-History Accumulation (FHA), End-of-Conversation Compaction (EoCC), and Single-Action Compaction (SAC).
Figure 4: Decode throughput collapses as the context window size grows. Peak sustained decode throughput (tokens/s, left axis) for open-weight coding models served under vLLM on NVIDIA H100 GPUs, as a function of the configured context window size. GLM 5.2 and Kimi K2.6 are served with INT4 experts and BF16 activations (Kimi additionally with an FP8 KV cache), Qwen 3 Coder Next in BF16. The right axis re-expresses the same curve as a speedup over the K operating point. Reducing the context window size from K to K buys (GLM 5.2), (Kimi K2.6), and (Qwen 3 Coder Next) more decoded tokens per second on identical hardware.
Figure 5: Long-horizon results as a function of total context limit. Top: accuracy changes in percentage points relative to each model’s full-history baseline; zero indicates unchanged accuracy. Bottom: baseline estimated optimized retail cost divided by the compaction configuration’s estimated optimized retail cost; indicates unchanged cost. Orange/blue identify Claude Opus 4.5 and GPT 5.6 Sol, respectively, and stars mark the baselines. Cost estimates use the model in Appendix B .
Figure 6: Long-input results as a function of total context limit. Top: accuracy changes relative to each model’s full-input baseline. Bottom: optimized retail cost savings, using the model in Appendix B .
Figure 7: LongBench v2: conversation length versus document length. Claude Opus 4.5, compaction at K / K. The document-length axis is logarithmic and the conversation-length axis is linear. The dashed curve marks .
Figure 8: LOONG: conversation length versus document length. Claude Opus 4.5, compaction at K / K (1,600 questions). The document-length axis is logarithmic and the conversation-length axis is linear. The dashed curve marks .
Large language models (LLMs) increasingly rely on long-context processing, but expanding context windows introduces substantial computational and financial costs. Existing context reduction approaches, including retrieval and memory compression methods, are typically evaluated using performance and efficiency metrics independently, limiting systematic comparison and deployment-aware decision-making. This paper introduces The Efficiency Frontier, a unified framework for cost--performance optimization in LLM context management. The framework models context strategy selection as a deployment-aware optimization problem that jointly accounts for task performance, token cost, and preprocessing reuse through amortized cost modeling. Unlike existing evaluations that compare methods in isolation, the proposed framework enables decision-oriented analysis. It identifies when different context management strategies become preferable under varying operational conditions. Experiments on HotpotQA reveal distinct operational regimes and transition boundaries between retrieval-based and preprocessing-based strategies. Results show that deployment-aware optimization reduces effective token usage by approximately 25% at comparable performance, enabling more cost-efficient deployment of large language model systems, while amortized memory compression achieves over 50% lower token cost relative to full-context prompting in higher-performance settings. Overall, the proposed framework provides a principled and practical foundation for evaluating and deploying scalable, efficient, and sustainable LLM systems across enterprise, scientific, and public-sector applications.
Trained Agentic Context Management
We study long context language models. Instead of training long context natively, or designing a long context harness, we train a model over the simplest possible harness: a tool to call itself with any specified prompt and a tool to read tokens in a range from the input context. We finetune Qwen3.6-35B-A3B on a diverse synthetic dataset using this harness. With only 8,000 tokens of context, our small model is as strong as GPT-5.4 with 1M tokens of context on the OOLONG-synth benchmark when document length exceeds 40K tokens.
In-Model Context Compression with Agentic Soft Tokens for Long-Horizon LLM Agents
Long-horizon LLM agents play an important role in solving complex and sustained tasks, with ever-growing interaction contexts. However, these accumulated contexts will raise substantial computational cost and obscure key decision-relevant evidence. Existing methods typically train external compressors or context-management agents to rewrite context as shorter hard-token sequences, but such external selection may not align with the LLM's evolving representation and is necessarily lossy. In this paper, we introduce Agentic Soft-Token Compression (ASTC), a training-free compression method using soft tokens within LLM agent for long-horizon tasks. Specifically, ASTC uses the model's native recurrent dynamics to determine the already absorbed information, leveraging the commonly-used hybrid Gated Delta Network (GDN)-attention. It then carries this information forward as agentic soft tokens while retaining exact values as hard tokens. The resulting compact sequence reduces later-layer computation and yields reusable KV caches, extending the savings across the agent's trajectory. Extensive experiments on long-horizon tasks show that ASTC matches or exceeds the uncompressed agent's accuracy with up to 50.68% fewer end-to-end Attention Pairs, while trained compressors require 15.4 to 103.7 times more Attention Pairs per successful task. These findings highlight agentic soft tokens as a model-native way to carry absorbed context forward as the task representation evolves.