mlsanityData to 7 Oct 2026

Enhancing Training Efficiency Using Packing with Flash Attention

arXiv 2407.09105 ↗First posted 12 Jul 2024cs.LG cs.AIcited by 12

Not on the map. Why?

Abstract (arXiv)

Padding is often used in tuning LLM models by adding special tokens to shorter training examples to match the length of the longest sequence in each batch. While this ensures uniformity for batch processing, it introduces inefficiencies by including irrelevant padding tokens in the computation and wastes GPU resources. Hugging Face SFT trainer has always offered the option to use packing to combine multiple training examples, allowing for maximal utilization of GPU resources. However, up till now, it did not offer proper masking of each packed training example. This capability has been added to Hugging Face Transformers 4.44. We analyse this new feature and show the benefits across different variations of packing.

Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 5 of its 16 references that are in the map. First posted on arXiv 12 Jul 2024.

Builds on

5 of 16 references.

References · 5

  1. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
  2. 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
  3. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
  4. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  5. 2024Analysing The Impact of Sequence Composition on Language Model Pre-Trainingcited by 22

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 3; 2025: 6; 2026: 3.

12 papers.