Improving Continual Pre-training Through Seamless Data Packing
Not on the map. Why?
Abstract (arXiv)
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 more effectively 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 baseline method in 99% of all settings. Code is available at https://github.com/Infernus-WIND/Seamless-Packing.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 27 of its 46 references that are in the map. First posted on arXiv 28 May 2025.
Builds on
27 of 46 references.
References · 27
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
- 2020Don't Stop Pretraining: Adapt Language Models to Domains and Taskscited by 1,548
- 2021Deduplicating Training Data Makes Language Models Bettercited by 705
- 2018A Discourse-Aware Attention Model for Abstractive Summarization of Long Documentscited by 477
15 more
- 2013Good Debt or Bad Debt: Detecting Semantic Orientations in Economic Textscited by 310
- 2023Continual Pre-training of Language Modelscited by 194
- 2023Mitigating the Alignment Tax of RLHFcited by 181
- 2021Towards Continual Knowledge Learning of Language Modelscited by 172
- 2019FlauBERT: Unsupervised Language Model Pre-training for Frenchcited by 153
- 2020Continual Lifelong Learning in Natural Language Processing: A Surveycited by 152
- 2023Continual Pre-Training of Large Language Models: How to (re)warm your model?cited by 135
- 2021An Empirical Investigation of the Role of Pre-training in Lifelong Learningcited by 134
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
- 2023In-context Pretraining: Language Modeling Beyond Document Boundariescited by 76
- 2024Reuse, Don't Retrain: A Recipe for Continued Pretraining of Language Modelscited by 69
- 2023LatestEval: Addressing Data Contamination in Language Model Evaluation through Dynamic and Time-Sensitive Test Constructioncited by 57
- 2021Understanding Continual Learning Settings with Data Distribution Drift Analysiscited by 38
- 2024Mitigating Catastrophic Forgetting in Language Transfer via Model Mergingcited by 36
- 2023Overcoming Catastrophic Forgetting in Massively Multilingual Continual Learningcited by 27
Built on by
Citing papers per year: 2026: 1.
1 paper.