动态调度数据提升长文本微调效率,训练速度最高快7.5倍。
Skrull: Towards Efficient Long Context Fine-tuning through Dynamic Data Scheduling
- 根据序列长短动态调整数据批次,平衡长/短文本计算负载。
- 在真实场景中平均提速3.76倍,峰值达7.54倍。
- 轻量级算法实现近乎零开销的在线调度,适合大规模模型训练。
长文本监督微调(Long-SFT)对提升大语言模型在长序列任务上的表现至关重要。传统方法需在包含长短序列的混合数据集上训练,但现有训练系统难以同时高效处理长、短序列,导致整体效率低下。本文提出Skrull,一种面向长文本微调的动态数据调度机制。通过将调度过程建模为联合优化问题,分析其中权衡关系,并设计轻量级算法实现近零开销的在线调度。Skrull基于DeepSpeed分布式训练系统实现,在真实长文本微调场景中,平均性能比DeepSpeed提升3.76倍(最高达7.54倍)。
原文摘要 · Abstract (English)
Long-context supervised fine-tuning (Long-SFT) plays a vital role in enhancing the performance of large language models (LLMs) on long-context tasks. To smoothly adapt LLMs to long-context scenarios, this process typically entails training on mixed datasets containing both long and short sequences. However, this heterogeneous sequence length distribution poses significant challenges for existing training systems, as they fail to simultaneously achieve high training efficiency for both long and short sequences, resulting in sub-optimal end-to-end system performance in Long-SFT. In this paper, we present a novel perspective on data scheduling to address the challenges posed by the heterogeneous data distributions in Long-SFT. We propose Skrull, a dynamic data scheduler specifically designed for efficient long-SFT. Through dynamic data scheduling, Skrull balances the computation requirements of long and short sequences, improving overall training efficiency. Furthermore, we formulate the scheduling process as a joint optimization problem and thoroughly analyze the trade-offs involved. Based on those analysis, Skrull employs a lightweight scheduling algorithm to achieve near-zero cost online scheduling in Long-SFT. Finally, we implement Skrull upon DeepSpeed, a state-of-the-art distributed training system for LLMs. Experimental results demonstrate that Skrull outperforms DeepSpeed by 3.76x on average (up to 7.54x) in real-world long-SFT scenarios.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。