Analysing The Impact of Sequence Composition on Language Model Pre-Training
Not on the map. Why?
Abstract (arXiv)
Most language model pre-training frameworks concatenate multiple documents into fixed-length sequences and use causal masking to compute the likelihood of each token given its context; this strategy is widely adopted due to its simplicity and efficiency. However, to this day, the influence of the pre-training sequence composition strategy on the generalisation properties of the model remains under-explored. In this work, we find that applying causal masking can lead to the inclusion of distracting information from previous documents during pre-training, which negatively impacts the performance of the models on language modelling and downstream tasks. In intra-document causal masking, the likelihood of each token is only conditioned on the previous tokens in the same document, eliminating potential distracting information from previous documents and significantly improving performance. Furthermore, we find that concatenating related documents can reduce some potential distractions during pre-training, and our proposed efficient retrieval-based sequence construction method, BM25Chunk, can improve in-context learning (+11.6%), knowledge memorisation (+9.8%), and context utilisation (+7.2%) abilities of language models without sacrificing efficiency.
Key facts. Cited by 25 papers in the map (data through 14 Oct 2026). Builds on 36 of its 43 references that are in the map. First posted on arXiv 21 Feb 2024.
Builds on
36 of 43 references.
References · 36
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2017Billion-scale similarity search with GPUscited by 2,497
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
24 more
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
- 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,488
- 2021Unsupervised Dense Information Retrieval with Contrastive Learningcited by 1,216
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,210
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 861
- 2021Deduplicating Training Data Makes Language Models Bettercited by 714
- 2024TinyLlama: An Open-Source Small Language Modelcited by 618
- 2024OLMo: Accelerating the Science of Language Modelscited by 613
- 2023Textbooks Are All You Needcited by 569
- 2020TweetEval: Unified Benchmark and Comparative Evaluation for Tweet Classificationcited by 417
- 2023DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretrainingcited by 399
- 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 309
- 2023SemDeDup: Data-efficient learning at web-scale through semantic deduplicationcited by 303
- 2023D4: Improving LLM Pretraining via Document De-Duplication and Diversificationcited by 150
- 2023Focused Transformer: Contrastive Training for Context Scalingcited by 133
- 2023LLM360: Towards Fully Transparent Open-Source LLMscited by 104
- 2022On the Effect of Pretraining Corpora on In-context Learning by a Large-scale Language Modelcited by 81
- 2023In-context Pretraining: Language Modeling Beyond Document Boundariescited by 79
- 2023The MiniPile Challenge for Data-Efficient Language Modelscited by 75
- 2023Pre-Training to Learn in Contextcited by 42
- 2021The Inductive Bias of In-Context Learning: Rethinking Pretraining Example Designcited by 33
- 2023Faster Causal Attention Over Large Sequences Through Sparse Flash Attentioncited by 25
- 2023Structured Packing in LLM Training Improves Long Context Utilizationcited by 17
Built on by
Citing papers per year: 2024: 9; 2025: 7; 2026: 9.
25 papers.
Sort:
By area:
- 2024Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inferencecited by 554
- 2025Why do LLMs attend to the first token?cited by 127
- 2024A Simple and Effective L2 Norm-Based Strategy for KV Cache Compressioncited by 86
- 2025Sailor2: Sailing in South-East Asia with Inclusive Multilingual LLMscited by 18
- 2024When Precision Meets Position: BFloat16 Breaks Down RoPE in Long-Context Trainingcited by 15
- 2024Enhancing Training Efficiency Using Packing with Flash Attentioncited by 12
- 2024Prepacking: A Simple Method for Fast Prefilling and Increased Throughput in Large Language Modelscited by 10
- 2026Data-efficient pre-training by scaling synthetic megadocscited by 7
- 2024Shaking Up VLMs: Comparing Transformers and Structured State Space Models for Vision & Language Modelingcited by 6
- 2025SkyLadder: Better and Faster Pretraining via Context Window Schedulingcited by 6
- 2024Mixture-of-Instructions: Aligning Large Language Models via Mixture Promptingcited by 4
- 2025Towards Large-Scale In-Context Reinforcement Learning by Meta-Training in Randomized Worldscited by 4
13 more
- 2025Trillion 7B Technical Reportcited by 4
- 2025From Scaling to Structured Expressivity: Rethinking Transformers for CTR Predictioncited by 3
- 2026Beyond Rephrasing: Book-Level Organization Improves Synthetic Textbook Data for Mid-Trainingcited by 3
- 2025Scaling Context, Not Parameters: Training a Compact 7B Language Model for Efficient Long-Context Processingcited by 2
- 2024Threshold Filtering Packing for Supervised Fine-Tuning: Training Related Samples within Packscited by 1
- 2024Refining Packing and Shuffling Strategies for Enhanced Performance in Generative Language Modelscited by 0
- 2026Whole-Piece Training for Symbolic Music Language Models via Full-Horizon Compressed Recurrencecited by 0
- 2026Pretraining EHR Foundation Models with Patient-Aware Samplingcited by 0
- 2026Hierarchical Solomonoff Induction: An Unbounded Machine Learning Modelcited by 0
- 2026Foresight-England: Development of a National-Scale Generative AI Model of Electronic Health Records for Medical Event Prediction across the COVID-19 Pandemiccited by 0
- 2026Zephon: Elastic Determinism for Online, Stateful Foundation Model Data Loading Pipelinescited by 0
- 2026Sequence Composition in EHR Foundation Model Pretrainingcited by 0
- 2026Fish Audio Drama 3 Technical Reportcited by 0
- 2026Fish Audio Drama 3 Technical Report13 Oct 2026
- 2026Sequence Composition in EHR Foundation Model Pretraining12 Oct 2026
- 2026Zephon: Elastic Determinism for Online, Stateful Foundation Model Data Loading Pipelines2 Oct 2026
- 2026Foresight-England: Development of a National-Scale Generative AI Model of Electronic Health Records for Medical Event Prediction across the COVID-19 Pandemic17 Aug 2026
- 2026Hierarchical Solomonoff Induction: An Unbounded Machine Learning Model2 Aug 2026
- 2026Beyond Rephrasing: Book-Level Organization Improves Synthetic Textbook Data for Mid-Training30 Jul 2026
- 2026Pretraining EHR Foundation Models with Patient-Aware Sampling24 Jul 2026
- 2026Data-efficient pre-training by scaling synthetic megadocs19 Mar 2026
- 2026Whole-Piece Training for Symbolic Music Language Models via Full-Horizon Compressed Recurrence23 Feb 2026
- 2025From Scaling to Structured Expressivity: Rethinking Transformers for CTR Prediction15 Nov 2025
- 2025Scaling Context, Not Parameters: Training a Compact 7B Language Model for Efficient Long-Context Processing13 May 2025
- 2025Trillion 7B Technical Report21 Apr 2025
13 more
- 2025Why do LLMs attend to the first token?3 Apr 2025
- 2025SkyLadder: Better and Faster Pretraining via Context Window Scheduling19 Mar 2025
- 2025Sailor2: Sailing in South-East Asia with Inclusive Multilingual LLMs18 Feb 2025
- 2025Towards Large-Scale In-Context Reinforcement Learning by Meta-Training in Randomized Worlds5 Feb 2025
- 2024Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference18 Dec 2024
- 2024When Precision Meets Position: BFloat16 Breaks Down RoPE in Long-Context Training20 Nov 2024
- 2024Shaking Up VLMs: Comparing Transformers and Structured State Space Models for Vision & Language Modeling9 Sep 2024
- 2024Refining Packing and Shuffling Strategies for Enhanced Performance in Generative Language Models19 Aug 2024
- 2024Threshold Filtering Packing for Supervised Fine-Tuning: Training Related Samples within Packs18 Aug 2024
- 2024Enhancing Training Efficiency Using Packing with Flash Attention12 Jul 2024
- 2024A Simple and Effective L2 Norm-Based Strategy for KV Cache Compression17 Jun 2024
- 2024Mixture-of-Instructions: Aligning Large Language Models via Mixture Prompting29 Apr 2024
- 2024Prepacking: A Simple Method for Fast Prefilling and Increased Throughput in Large Language Models15 Apr 2024
- 2026Fish Audio Drama 3 Technical Reportcited by 0
- 2026Fish Audio Drama 3 Technical Report13 Oct 2026
- 2024Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inferencecited by 554
- 2025Why do LLMs attend to the first token?cited by 127
- 2025Sailor2: Sailing in South-East Asia with Inclusive Multilingual LLMscited by 18
- 2024When Precision Meets Position: BFloat16 Breaks Down RoPE in Long-Context Trainingcited by 15
- 2024Enhancing Training Efficiency Using Packing with Flash Attentioncited by 12
- 2024Prepacking: A Simple Method for Fast Prefilling and Increased Throughput in Large Language Modelscited by 10
- 2026Data-efficient pre-training by scaling synthetic megadocscited by 7
- 2025SkyLadder: Better and Faster Pretraining via Context Window Schedulingcited by 6
- 2025Trillion 7B Technical Reportcited by 4
- 2026Beyond Rephrasing: Book-Level Organization Improves Synthetic Textbook Data for Mid-Trainingcited by 3
- 2025Scaling Context, Not Parameters: Training a Compact 7B Language Model for Efficient Long-Context Processingcited by 2
- 2024Threshold Filtering Packing for Supervised Fine-Tuning: Training Related Samples within Packscited by 1
12 most cited of 19 All 19 (JSON)
- 2026Sequence Composition in EHR Foundation Model Pretraining12 Oct 2026
- 2026Zephon: Elastic Determinism for Online, Stateful Foundation Model Data Loading Pipelines2 Oct 2026
- 2026Foresight-England: Development of a National-Scale Generative AI Model of Electronic Health Records for Medical Event Prediction across the COVID-19 Pandemic17 Aug 2026
- 2026Hierarchical Solomonoff Induction: An Unbounded Machine Learning Model2 Aug 2026
- 2026Beyond Rephrasing: Book-Level Organization Improves Synthetic Textbook Data for Mid-Training30 Jul 2026
- 2026Pretraining EHR Foundation Models with Patient-Aware Sampling24 Jul 2026
- 2026Data-efficient pre-training by scaling synthetic megadocs19 Mar 2026
- 2026Whole-Piece Training for Symbolic Music Language Models via Full-Horizon Compressed Recurrence23 Feb 2026
- 2025Scaling Context, Not Parameters: Training a Compact 7B Language Model for Efficient Long-Context Processing13 May 2025
- 2025Trillion 7B Technical Report21 Apr 2025
- 2025Why do LLMs attend to the first token?3 Apr 2025
- 2025SkyLadder: Better and Faster Pretraining via Context Window Scheduling19 Mar 2025
12 newest of 19 All 19 (JSON)