From 128K to 4M: Efficient Training of Ultra-Long Context Large Language Models
Abstract
Long-context capabilities are essential for a wide range of applications, including document and video understanding, in-context learning, and inference-time scaling, all of which require models to process and reason over long sequences of text and multimodal data.In this work, we introduce an efficient training recipe for building ultra-long context LLMs from aligned instruct model, pushing the boundaries of context lengths from 128K to 1M, 2M, and 4M tokens.Our approach leverages continued pretraining strategies to extend the context window, while employing efficient instruction tuning to maintain short context capabilities.Our UltraLong-8B, built on Llama-3.1-Instruct,achieves state-of-the-art performance across a diverse set of long-context benchmarks.Importantly, UltraLong-8B also maintains competitive performance on standard benchmarks, showing balanced improvements for both long and short context tasks.We provide an in-depth analysis of key design choices, highlighting the impacts of scaling strategies and data composition.Our findings establish a robust framework for efficiently scaling context lengths while preserving general model capabilities.We released all model weights for open research.We release all model weights
Fields of Study & Subjects
Multimodal Machine Learning Applications
Topic Modeling
Domain Adaptation and Few-Shot Learning
Publication details
- Journal / source
- Findings of the Association for Computational Linguistics: ACL 2026
- Publisher
- Association for Computational Linguistics
- Pages
- 13122–13133
- Publication date
- 1 January 2026
- Language
- EN