Improving Continual Pre-training Through Seamless Data Packing

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.

Authors

Institutions

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.findings-acl.777
Primary Topic
Innovative Teaching Methods
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Improving Continual Pre-training Through Seamless Data Packing

Xuanjing Huang, Xiaohua Wang, Xiaoqing Zheng, Xuan Gao et al.
Innovative Teaching Methods
article

Improving Continual Pre-training Through Seamless Data Packing

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

Abstract

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.

Fudan University (CN)
National Natural Science Foundation of China
Climate action
Openalex Percentile: Top 79%
Innovative Teaching Methods
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Improving Continual Pre-training Through Seamless Data Packing — Xuanjing Huang, Xiaohua Wang, et al. · (2025) | TGRS Research Map | TGRS