mlsanityData to 14 Oct 2026

Dataset Decomposition: Faster LLM Training with Variable Sequence Length Curriculum

arXiv 2405.13226 ↗First posted 21 May 2024cs.CL cs.LGcited by 26

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) are commonly trained on datasets consisting of fixed-length token sequences. These datasets are created by randomly concatenating documents of various lengths and then chunking them into sequences of a predetermined target length (concat-and-chunk). Recent attention implementations mask cross-document attention, reducing the effective length of a chunk of tokens. Additionally, training on long sequences becomes computationally prohibitive due to the quadratic cost of attention. In this study, we introduce dataset decomposition, a novel variable sequence length training technique, to tackle these challenges. We decompose a dataset into a union of buckets, each containing sequences of the same size extracted from a unique document. During training, we use variable sequence length and batch-size, sampling simultaneously from all buckets with a curriculum. In contrast to the concat-and-chunk baseline, which incurs a fixed attention cost at every step of training, our proposed method incurs a computational cost proportional to the actual document lengths at each step, resulting in significant savings in training time. We train an 8k context-length 1B model at the same cost as a 2k context-length model trained with the baseline approach. Experiments on a web-scale corpus demonstrate that our approach significantly enhances performance on standard language evaluations and long-context benchmarks, reaching target accuracy with up to 6x faster training compared to the baseline. Our method not only enables efficient pretraining on long sequences but also scales effectively with dataset size. Lastly, we shed light on a critical yet less studied aspect of training large language models: the distribution and curriculum of sequence lengths, which results in a non-negligible difference in performance.

Key facts. Cited by 26 papers in the map (data through 14 Oct 2026). Builds on 46 of its 66 references that are in the map. First posted on arXiv 21 May 2024.

Builds on

46 of 66 references.

References · 46

  1. 2017Attention Is All You Needcited by 60,361
  2. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
  5. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  6. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
  7. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  8. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
  9. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  10. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
  11. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  12. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
34 more
  1. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
  2. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
  3. 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
  4. 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,488
  5. 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 992
  6. 2023The RefinedWeb Dataset for Falcon LLM: Outperforming Curated Corpora with Web Data, and Web Data Onlycited by 763
  7. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
  8. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
  9. 2019Latent Retrieval for Weakly Supervised Open Domain Question Answeringcited by 695
  10. 2018CoQA: A Conversational Question Answering Challengecited by 683
  11. 2015Cyclical Learning Rates for Training Neural Networkscited by 629
  12. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
  13. 2024Dolma: an Open Corpus of Three Trillion Tokens for Language Model Pretraining Researchcited by 483
  14. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
  15. 2023Effective Long-Context Scaling of Foundation Modelscited by 303
  16. 2023Patch n' Pack: NaViT, a Vision Transformer for any Aspect Ratio and Resolutioncited by 229
  17. 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 213
  18. 2022Exploring Length Generalization in Large Language Modelscited by 206
  19. 2024World Model on Million-Length Video And Language With Blockwise RingAttentioncited by 198
  20. 2023Scaling Laws of RoPE-based Extrapolationcited by 125
  21. 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
  22. 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 111
  23. 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 86
  24. 2023In-context Pretraining: Language Modeling Beyond Document Boundariescited by 79
  25. 2023An Inverse Scaling Law for CLIP Trainingcited by 77
  26. 2021The Stability-Efficiency Dilemma: Investigating Sequence Length Warmup for Training GPT Modelscited by 36
  27. 2021Sequence Length is a Domain: Length-based Overfitting in Transformer Modelscited by 35
  28. 2024Fewer Truncations Improve Language Modelingcited by 35
  29. 2024The What, Why, and How of Context Length Extension Techniques in Large Language Models -- A Detailed Surveycited by 33
  30. 2017Supervised and Unsupervised Transfer Learning for Question Answeringcited by 24
  31. 2016Towards Machine Comprehension of Spoken Content: Initial TOEFL Listening Comprehension Test by Machinecited by 23
  32. 2022CVNets: High Performance Library for Computer Visioncited by 16
  33. 2023GrowLength: Accelerating LLMs Pretraining by Progressively Growing Training Lengthcited by 11
  34. 2023On Batching Variable Size Inputs for Training End-to-End Speech Enhancement Systemscited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 4; 2025: 13; 2026: 9.

26 papers.

Sort:

By area:

  1. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
  2. 2024Multimodal Autoregressive Pre-training of Large Vision Encoderscited by 109
  3. 2025Just Enough Thinking: Efficient Reasoning with Adaptive Length Penalties Reinforcement Learningcited by 52
  4. 2025Beyond Random Sampling: Efficient Language Model Pretraining via Curriculum Learningcited by 26
  5. 2025Pretraining with hierarchical memories: separating long-tail and common knowledgecited by 14
  6. 2025Problem-Solving Logic Guided Curriculum In-Context Learning for LLMs Complex Reasoningcited by 12
  7. 2025What Makes a Good Curriculum? Disentangling the Effects of Data Ordering on LLM Mathematical Reasoningcited by 11
  8. 2025Linear-MoE: Linear Sequence Modeling Meets Mixture-of-Expertscited by 6
  9. 2025SkyLadder: Better and Faster Pretraining via Context Window Schedulingcited by 6
  10. 2025AdaSTaR: Adaptive Data Sampling for Training Self-Taught Reasonerscited by 6
  11. 2025A Survey of LLM × DATAcited by 4
  12. 2025Compute-Optimal Quantization-Aware Trainingcited by 4
14 more
  1. 2026Beyond a Single Extractor: Re-thinking HTML-to-Text Extraction for LLM Pretrainingcited by 4
  2. 2024Beyond Fixed Length: Bucket Pre-training is All You Needcited by 2
  3. 2024DataSculpt: Crafting Data Landscapes for Long-Context LLMs through Multi-Objective Partitioningcited by 2
  4. 2026Information Abundance Paradox: Long-Context Training Undermines Parametric Knowledgecited by 1
  5. 2025Revisiting Data Challenges of Computational Pathology: A Pack-based Multiple Instance Learning Training Frameworkcited by 0
  6. 2025Boolean Satisfiability via Imitation Learningcited by 0
  7. 2025Operon: Incremental Construction of Ragged Data via Named Dimensionscited by 0
  8. 2026D'ej`aQ: Open-Ended Evolution of Diverse, Learnable and Verifiable Problemscited by 0
  9. 2026Bringing Order to Asynchronous SGD: Towards Optimality under Data-Dependent Delays with Momentumcited by 0
  10. 2026D3: Dynamic Directional Graph-Constrained Data Scheduling for LLM Trainingcited by 0
  11. 2026ONE CYLinder: A Benchmark for Graph-Based Surrogate Modeling of Unsteady Bluff-Body Flowscited by 0
  12. 2026Criticality in Dissimilar Decomposition and Undersampling of Random Datasets with Anomaliescited by 0
  13. 2026Linear RNN Scaling Laws: When Longer Sequences Beat More Sequencescited by 0
  14. 2026Which LLM to pick? Online Active Model Selection for Large Language Modelscited by 0