Jet-Long: Efficient Long-Context Extension with Dynamic Bifocal RoPE
cs.LG, cs.AI
Submitted: 2026-07-08
Updated: 2026-09-29
Comments: NeurIPS camera ready, funding update
Code: https://github.com/jet-ai-projects/jet-long
License: http://creativecommons.org/licenses/by/4.0/
The gist: Modern LLMs are increasingly deployed in long-context applications such as retrieval-augmented generation, repository-level coding, and agentic workflows whose accumulated reasoning and tool traces
Terminology
Abstract
Modern LLMs are increasingly deployed in long-context applications such as retrieval-augmented generation, repository-level coding, and agentic workflows whose accumulated reasoning and tool traces routinely push the input an order of magnitude past the pretraining window, making zero-shot context extension the dominant deployment path for open-weight checkpoints. The dominant zero-shot methods (YaRN, Self-Extend, DCA) fix a single rescaling factor up front, so an aggressive factor sacrifices short-context fidelity while a conservative one breaks down at long contexts; recent length-aware variants adapt the mapping, but with a fitted or distance-dependent schedule. We propose Jet-Long, a tuning-free zero-shot method that pairs a local RoPE-faithful window with a long-range window whose rescaling factor adapts dynamically to the current sequence length via a parameter-free analytic schedule, recovering the base model exactly at short inputs while extrapolating cleanly at long ones. An inclusion-exclusion attention merge and on-the-fly RoPE correction enable a fused CuTe implementation. On H100 at 64K-128K, prefill retains 83-88% of FlashAttention-3 throughput across the evaluated Qwen3 sizes and 88-93% of a matched CuTe control; Qwen3-8B single-batch generation reaches 1.04-1.08 times FlashAttention-3 throughput. On Qwen3-1.7B/4B/8B up to 128K context, Jet-Long leads RULER by +4.79/+2.18/+2.03 percentage points over the strongest baseline at 1.7B/4B/8B, achieves the best overall accuracy on HELMET-RAG (a benchmark identified by HELMET as the most efficient predictor of downstream long-context performance) and attains the lowest PG-19 perplexity. Additional evaluations cover Meta-Llama-3-8B, post-trained Qwen3 checkpoints, and the hybrid Jet-Nemotron architecture, supporting broader applicability without retraining. The local-window hyperparameter remains robust across the tested settings.
Sources
- gpt-oss-120b & gpt-oss-20b Model Card
- Training-Free Long-Context Scaling of Large Language Models
- Why Does the Effective Context Length of LLMs Fall Short?
- NVIDIA Nemotron Nano 2: An Accurate and Efficient Hybrid Mamba-Transformer Reasoning Model
- Longformer: The Long-Document Transformer
- Extending Context Window of Large Language Models via Positional Interpolation
- Rethinking Attention with Performers
- SELF: Self-Extend the Context Length With Logistic Growth Function
- FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens
- Data Engineering for Scaling Language Models to 128K Context
- Retrieval-Augmented Generation for Large Language Models: A Survey
- Mamba: Linear-Time Sequence Modeling with Selective State Spaces
- Jet-Nemotron: Efficient Language Model with Post Neural Architecture Search
- RULER: What's the Real Context Size of Your Long-Context Language Models?
- SWE-bench: Can Language Models Resolve Real-World GitHub Issues?
- LLM Maybe LongLM: Self-Extend LLM Context Window Without Tuning
- A Training-Free Length Extrapolation Approach for LLMs: Greedy Attention Logit Interpolation (GALI)
- DeepSeek-V3 Technical Report
- DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks