Lune

ACL Findings2025

Packing Analysis: Packing Is More Appropriate for Large Models or Datasets in Supervised Fine-tuning

Shuhe Wang, Guoyin Wang, Yizhong Wang, Jiwei Li, Eduard H. Hovy, Chen Guo

摘要

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 pretraining, 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 finetuned on datasets of different sizes, aiming to advance future research on packing methods.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignment 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • QLoRA: Efficient Finetuning of Quantized LLMs 引用了 LoRA: Low-Rank Adaptation of Large Language Models
  • QLoRA: Efficient Finetuning of Quantized LLMs 引用了 Measuring Massive Multitask Language Understanding
  • QLoRA: Efficient Finetuning of Quantized LLMs 引用了 Finetuned Language Models are Zero-Shot Learners
  • Hierachical Balance Packing: Towards Efficient Supervised Fine-tuning for Long-Context LLM 引用了 Measuring Massive Multitask Language Understanding
  • Resource Multiplexing in Tuning and Serving Large Language Models 引用了 LoRA: Low-Rank Adaptation of Large Language Models
  • LoRAFusion: Efficient LoRA Fine-Tuning for LLMs 引用了 LoRA: Low-Rank Adaptation of Large Language Models
  • LoRAFusion: Efficient LoRA Fine-Tuning for LLMs 引用了 QLoRA: Efficient Finetuning of Quantized LLMs
  • LoRAFusion: Efficient LoRA Fine-Tuning for LLMs 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. Resource Multiplexing in Tuning and Serving Large Language ModelsYongjun He, Haofeng Yang, Yao Lu, Ana Klimovic 等USENIX ATC 2025 · 9 次引用
  2. Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data AssignmentHaoyang Li, Fangcheng Fu, Sheng Lin, Hao Ge 等SIGMOD 2026 · 7 次引用
  3. LoRAFusion: Efficient LoRA Fine-Tuning for LLMsZhanda Zhu, Qidong Su, Yaoyao Ding, Kevin Song 等EuroSys 2026 · 2 次引用
  4. Hierachical Balance Packing: Towards Efficient Supervised Fine-tuning for Long-Context LLMYongqiang Yao, Jingru Tan, Kaihuan Liang, Feizhao Zhang 等NeurIPS 2025

它引用的 Paper23

  1. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu 等ICLR 2022 · 18,833 次引用
  2. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
  3. QLoRA: Efficient Finetuning of Quantized LLMsTim Dettmers, Artidoro Pagnoni, Ari Holtzman, Luke ZettlemoyerNeurIPS 2023 · 5,863 次引用
  4. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
  5. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu 等ICLR 2022 · 4,966 次引用

相关 Paper

  1. Fewer Truncations Improve Language ModelingHantian Ding, Zijian Wang, Giovanni Paolini, Varun Kumar 等ICML 2024 · 28 次引用
  2. Improving Continual Pre-training Through Seamless Data PackingRuicheng Yin, Xuan Gao, Changze Lv, Xiaohua Wang 等ACL Findings 2025
  3. How to Train Long-Context Language Models (Effectively)Tianyu Gao, Alexander Wettig, Howard Yen, Danqi ChenACL 2025
  4. Unveiling the Secret Recipe: A Guide For Supervised Fine-Tuning Small LLMsAldo Pareja, Nikhil Shivakumar Nayak, Hao Wang, Krishnateja Killamsetty 等ICLR 2025
  5. Scaling Law for Multimodal Large Language Model Supervised Fine-TuningYifan Zhang, Tao Yu, Feng Li, Chaoyou Fu 等ACL 2026
黄昏的海面,两侧是细线勾勒的悬崖