Packing Analysis: Packing Is More Appropriate for Large Models or Datasets in Supervised Fine-tuning
Not on the map. Why?
Abstract (arXiv)
Packing, initially utilized in the pre-training phase, is an optimization technique designed to maximize hardware resource efficiency by combining different training sequences to fit the model's maximum input length. Although it has demonstrated effectiveness during pre-training, there remains a lack of comprehensive analysis for the supervised fine-tuning (SFT) stage on the following points: (1) whether packing can effectively enhance training efficiency while maintaining performance, (2) the suitable size of the model and dataset for fine-tuning with the packing method, and (3) whether packing unrelated or related training samples might cause the model to either excessively disregard or over-rely on the context. In this paper, we perform extensive comparisons between SFT methods using padding and packing, covering SFT datasets ranging from 69K to 1.2M and models from 8B to 70B. This provides the first comprehensive analysis of the advantages and limitations of packing versus padding, as well as practical considerations for implementing packing in various training scenarios. Our analysis covers various benchmarks, including knowledge, reasoning, and coding, as well as GPT-based evaluations, time efficiency, and other fine-tuning parameters. We also open-source our code for fine-tuning and evaluation and provide checkpoints fine-tuned on datasets of different sizes, aiming to advance future research on packing methods. Code is available at: https://github.com/ShuheWang1998/Packing-Analysis?tab=readme-ov-file.
Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Builds on 36 of its 51 references that are in the map. First posted on arXiv 10 Oct 2024.
Builds on
36 of 51 references.
References · 36
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
24 more
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2023Qwen Technical Reportcited by 3,344
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
- 2017Accurate, Large Minibatch SGD: Training ImageNet in 1 Hourcited by 1,492
- 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,301
- 2021BitFit: Simple Parameter-efficient Fine-tuning for Transformer-based Masked Language-modelscited by 1,245
- 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,202
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,154
- 2023LIMA: Less Is More for Alignmentcited by 1,100
- 2022Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Taskscited by 868
- 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 839
- 2024Yi: Open Foundation Models by 01.AIcited by 719
- 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 699
- 2024WildChat: 1M ChatGPT Interaction Logs in the Wildcited by 629
- 2023Instruction Tuning for Large Language Models: A Surveycited by 623
- 2023How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resourcescited by 408
- 2023Principle-Driven Self-Alignment of Language Models from Scratch with Minimal Human Supervisioncited by 318
- 2024WildBench: Benchmarking LLMs with Challenging Tasks from Real Users in the Wildcited by 218
- 2024Aya Dataset: An Open-Access Collection for Multilingual Instruction Tuningcited by 177
- 2022EditEval: An Instruction-Based Benchmark for Text Improvementscited by 30
- 2022LINGUIST: Language Model Instruction Tuning to Generate Annotated Utterances for Intent Classification and Slot Taggingcited by 29
- 2024Scaling Data Diversity for Fine-Tuning Language Models in Human Alignmentcited by 26
- 2023Sim-GPT: Text Similarity via GPT Annotated Datacited by 2
Built on by
Citing papers per year: 2024: 2; 2025: 8; 2026: 1.
11 papers.
- 2024Reinforcement Learning Enhanced LLMs: A Surveycited by 71
- 2025100 Days After DeepSeek-R1: A Survey on Replication Studies and More Directions for Reasoning Language Modelscited by 30
- 2025ORANSight-2.0: Foundational LLMs for O-RANcited by 13
- 2025Bielik 11B v3: Multilingual Large Language Model for European Languagescited by 6
- 2024Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignmentcited by 3
- 2025MindVL: Towards Efficient and Effective Training of Multimodal Large Language Models on Ascend NPUscited by 3
- 2025LoRAFusion: Efficient LoRA Fine-Tuning for LLMscited by 3
- 2025Hierarchical Balance Packing: Towards Efficient Supervised Fine-tuning for Long-Context LLMcited by 2
- 2026FlashCP: Load-Balanced Communication-Efficient Context Parallelism for LLM Trainingcited by 1
- 2025SlimPack: Fine-Grained Asymmetric Packing for Balanced and Efficient Variable-Length LLM Trainingcited by 0
- 2025Efficient Long-context Language Model Training by Core Attention Disaggregationcited by 0
- 2026FlashCP: Load-Balanced Communication-Efficient Context Parallelism for LLM Training7 Jun 2026
- 2025Bielik 11B v3: Multilingual Large Language Model for European Languages30 Dec 2025
- 2025Efficient Long-context Language Model Training by Core Attention Disaggregation20 Oct 2025
- 2025LoRAFusion: Efficient LoRA Fine-Tuning for LLMs30 Sep 2025
- 2025SlimPack: Fine-Grained Asymmetric Packing for Balanced and Efficient Variable-Length LLM Training30 Sep 2025
- 2025MindVL: Towards Efficient and Effective Training of Multimodal Large Language Models on Ascend NPUs15 Sep 2025
- 2025100 Days After DeepSeek-R1: A Survey on Replication Studies and More Directions for Reasoning Language Models1 May 2025
- 2025Hierarchical Balance Packing: Towards Efficient Supervised Fine-tuning for Long-Context LLM10 Mar 2025
- 2025ORANSight-2.0: Foundational LLMs for O-RAN7 Mar 2025
- 2024Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignment10 Dec 2024
- 2024Reinforcement Learning Enhanced LLMs: A Survey5 Dec 2024