Lune

ACL2025顶会

How to Train Long-Context Language Models (Effectively)

Tianyu Gao, Alexander Wettig, Howard Yen, Danqi Chen

摘要

We study continued training and supervised fine-tuning (SFT) of a language model (LM) to make effective use of long-context information. We first establish a reliable evaluation protocol to guide model developmentinstead of perplexity or simple needle-in-a-haystack (NIAH) tests, we use a broad set of long-context downstream tasks, and we evaluate models after SFT as this better reveals long-context abilities. Supported by our robust evaluations, we run thorough experiments to decide the data mix for continued pre-training, the instruction tuning dataset, and many other design choices such as position extrapolation. We find that (1) code repositories and books are excellent sources of long data, but it is crucial to combine them with high-quality short-context data; (2) training with a sequence length beyond the evaluation length boosts long-context performance; (3) for SFT, using only short instruction datasets yields strong performance on long-context tasks. Our final model, ProLong-8B, which is initialized from Llama-3 and trained on 40B tokens, demonstrates state-of-the-art longcontext performance among similarly sized models at a length of 128K. ProLong outperforms Llama-3.1-8B-Instruct on the majority of long-context tasks despite using only 5% as many tokens during long-context training. Additionally, ProLong can effectively process up to 512K tokens, one of the longest context windows of publicly available LMs. 1

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 45 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Efficient Streaming Language Models with Attention Sinks 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Efficient Streaming Language Models with Attention Sinks 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • Rope to Nope and Back Again: A New Hybrid Attention Strategy 引用了 Efficient Streaming Language Models with Attention Sinks
  • Rope to Nope and Back Again: A New Hybrid Attention Strategy 引用了 Measuring Massive Multitask Language Understanding
  • Rope to Nope and Back Again: A New Hybrid Attention Strategy 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Rope to Nope and Back Again: A New Hybrid Attention Strategy 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • mmBERT: A Modern Multilingual Encoder with Annealed Language Learning 引用了 Seq vs Seq: An Open Suite of Paired Encoders and Decoders
  • Seq vs Seq: An Open Suite of Paired Encoders and Decoders 引用了 mmBERT: A Modern Multilingual Encoder with Annealed Language Learning
  • mmBERT: A Modern Multilingual Encoder with Annealed Language Learning 引用了 Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference
  • Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Models 引用了 Efficient Streaming Language Models with Attention Sinks
  • Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Models 引用了 Measuring Massive Multitask Language Understanding
  • Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Models 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • Seq vs Seq: An Open Suite of Paired Encoders and Decoders 引用了 WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • Seq vs Seq: An Open Suite of Paired Encoders and Decoders 引用了 Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper45

  1. Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and InferenceBenjamin Warner, Antoine Chaffin, Benjamin Clavié, Orion Weller 等ACL 2025 · 552 次引用
  2. Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language ModelsXin Cheng, Wangding Zeng, Damai Dai, Qinyu Chen 等ACL 2026 · 57 次引用
  3. Rope to Nope and Back Again: A New Hybrid Attention StrategyBowen Yang, Bharat Venkitesh, Dwaraknath Gnaneshwar, Hangyu Lin 等NeurIPS 2025 · 51 次引用
  4. Seq vs Seq: An Open Suite of Paired Encoders and DecodersOrion Weller, Kathryn Ricci, Marc Marone, Antoine Chaffin 等ICLR 2026 · 50 次引用
  5. mmBERT: A Modern Multilingual Encoder with Annealed Language LearningMarc Marone, Orion Weller, William Fleshman, Eugene Yang 等ICML 2026 · 49 次引用

它引用的 Paper44

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
  2. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
  3. WinoGrande: An Adversarial Winograd Schema Challenge at ScaleKeisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, Yejin ChoiAAAI 2020 · 3,037 次引用
  4. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 次引用
  5. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用

相关 Paper

  1. Data Engineering for Scaling Language Models to 128K ContextYao Fu, Rameswar Panda, Xinyao Niu, Xiang Yue 等ICML 2024 · 204 次引用
  2. When Long Helps Short: How Context Length in Supervised Fine-tuning Affects Behavior of Large Language ModelsYingming Zheng, Hanqi Li, Kai Yu, Lu ChenEMNLP 2025
  3. From 128K to 4M: Efficient Training of Ultra-Long Context Large Language ModelsChejian Xu, Wei Ping, Peng Xu, Zihan Liu 等ACL Findings 2026 · 1 次引用
  4. Benchmarking and Improving Long-Text Translation with Large Language ModelsLongyue Wang, Zefeng Du, Wenxiang Jiao, Chenyang Lyu 等ACL Findings 2024 · 8 次引用
  5. LongRoPE2: Near-Lossless LLM Context Window ScalingNing Shang, Li Lyna Zhang, Siyuan Wang, Gaokai Zhang 等ICML 2025
黄昏的海面,两侧是细线勾勒的悬崖