Lune

ACL Findings2025

Improving Continual Pre-training Through Seamless Data Packing

Ruicheng Yin, Xuan Gao, Changze Lv, Xiaohua Wang, Xiaoqing Zheng, Xuanjing Huang

摘要

Continual pre-training has demonstrated significant potential in enhancing model performance, particularly in domain-specific scenarios. The most common approach for packing data before continual pre-training involves concatenating input texts and splitting them into fixed-length sequences. While straightforward and efficient, this method often leads to excessive truncation and context discontinuity, which can hinder model performance. To address these issues, we explore the potential of data engineering to enhance continual pre-training, particularly its impact on model performance and efficiency. We propose Seamless Packing (SP), a novel data packing strategy aimed at preserving contextual information and enhancing model performance. Our approach employs a sliding window technique in the first stage that synchronizes overlapping tokens across consecutive sequences, ensuring better continuity and contextual coherence. In the second stage, we adopt a First-Fit-Decreasing algorithm to pack shorter texts into bins slightly larger than the target sequence length, thereby minimizing padding and truncation. Empirical evaluations across various model architectures and corpus domains demonstrate the effectiveness of our method, outperforming baselines in 99% of all settings. Code is available at https://github.com/Infernus-WIND/Seamless-Packing.

问 Lune

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

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

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Towards Continual Knowledge Learning of Language Models 引用了 Don't Stop Pretraining: Adapt Language Models to Domains and Tasks
  • Towards Continual Knowledge Learning of Language Models 引用了 Deduplicating Training Data Makes Language Models Better
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper13

  1. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu 等ICLR 2022 · 18,833 次引用
  2. Deduplicating Training Data Makes Language Models BetterKatherine Lee, Daphne Ippolito, Andrew Nystrom, Chiyuan Zhang 等ACL 2022 · 844 次引用
  3. Towards Continual Knowledge Learning of Language ModelsJoel Jang, Seonghyeon Ye, Sohee Yang, Joongbo Shin 等ICLR 2022 · 204 次引用
  4. Don't Stop Pretraining: Adapt Language Models to Domains and TasksSuchin Gururangan, Ana Marasovic, Swabha Swayamdipta, Kyle Lo 等ACL 2020 · 93 次引用
  5. In-Context Pretraining: Language Modeling Beyond Document BoundariesWeijia Shi, Sewon Min, Maria Lomeli, Chunting Zhou 等ICLR 2024 · 87 次引用

相关 Paper

  1. Fewer Truncations Improve Language ModelingHantian Ding, Zijian Wang, Giovanni Paolini, Varun Kumar 等ICML 2024 · 28 次引用
  2. Data Engineering for Scaling Language Models to 128K ContextYao Fu, Rameswar Panda, Xinyao Niu, Xiang Yue 等ICML 2024 · 204 次引用
  3. Adapt Before Continual LearningAojun Lu, Tao Feng, Hangjie Yuan, Chunhui Ding 等AAAI 2026
  4. Structured Packing in LLM Training Improves Long Context UtilizationKonrad Staniszewski, Szymon Tworkowski, Sebastian Jaszczur, Yu Zhao 等AAAI 2025 · 17 次引用
  5. Packing Analysis: Packing Is More Appropriate for Large Models or Datasets in Supervised Fine-tuningShuhe Wang, Guoyin Wang, Yizhong Wang, Jiwei Li 等ACL Findings 2025 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖