Jet-Long: Efficient Long-Context Extension with Dynamic Bifocal RoPE
Haozhan Tang, Zerui Wang, Yuxian Gu, Song Han, Han Cai
NeurIPS page · OpenReview · alphaXiv · Open on the map
Category: Efficient LLM Inference & Training › Sparse Long-Context Attention · Type: new method · Keywords: long-context extension, RoPE rescaling, zero-shot tuning, efficient inference, LLM scaling
Areas: Memory › Model Memory Optimization › Efficient Attention for LLMs; Long Context › Long-context mechanisms › Long-context attention mechanisms
Summary
Jet-Long is a tuning-free zero-shot method that dynamically rescales RoPE to preserve short-context fidelity while efficiently extending long contexts.
Explained to a 5-year-old
A big computer brain called a language model can read long stories. If we make it read too much, it sometimes forgets the short parts. Jet-Long is a trick that changes how the brain looks at the story so it can remember both short and long parts. The trick works without having to teach the brain new things. It also runs quickly on computers, helping the brain answer questions from long texts.
Explained to a 5-year-old, longer
A language model is a computer program that can read and write words, like a very smart assistant. When we ask it to read a really long text, it can get confused and forget the beginning. Most current tricks only change one part of the reading process, which makes either short or long texts work well, but not both. Jet-Long is a new idea that splits the reading into two parts: a close look at the short part and a far look at the long part. The far part changes how it reads depending on how long the text is, so it can keep the short part clear and the long part useful. This way, the model can remember the short sentences exactly and still understand the long ones. The trick does not need any extra training; it just adjusts the existing model. It also runs fast because the changes are made in a special way that works well on modern computer chips. Because it is fast and does not need new training, people can use it easily on their own computer models. The model can also work with other types of reading tricks, like a different kind of attention, without needing to be taught again. This makes the model more useful for tasks like answering questions from long documents or helping with coding in big code bases. Overall, Jet-Long helps the computer brain be better at handling both short and long texts at the same time.
For a technical reader
Jet-Long introduces a dynamic RoPE rescaling scheme that adapts per sequence length, preserving short-context fidelity while extending to long contexts without any fine-tuning. It merges a local faithful window with a long-range window using an inclusion-exclusion attention merge and on-the-fly RoPE correction, all fused into a single CuTe kernel for high throughput. The implementation achieves up to 1.39× FA2 throughput on H100 and adds ≤4% overhead per generation step. It also generalizes to hybrid attention architectures, providing further long-context gains without retraining.
Problem
Existing zero-shot long-context extension methods use a fixed rescaling factor, creating a trade-off between short-context accuracy and long-context capability. This makes it difficult to handle both short and very long inputs without sacrificing performance.
Method
The approach uses a local RoPE-faithful window combined with a long-range window whose rescaling factor adapts dynamically to the current sequence length, merging attention via inclusion-exclusion and applying on-the-fly RoPE correction, all implemented in a single CuTe kernel for efficient inference.
Results
The approach improves RULER scores by +4.79, +2.18, +2.03 pp on Qwen3-1.7B/4B/8B, achieves the best accuracy on HELMET-RAG and the lowest PG-19 perplexity, while adding ≤4% overhead per generation step.
Contributions
A dynamic, tuning-free zero-shot extension that balances short- and long-context performance, an efficient CuTe kernel implementation with minimal overhead, and evidence of generalization to hybrid attention architectures such as Jet-Nemotron.
Practical relevance
Enables open-weight LLMs to handle long contexts efficiently without tuning, facilitating deployment in retrieval-augmented generation, coding assistants, and agentic workflows.
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction