arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.19609cs.LGcs.AI
收藏

Skrull:通过动态数据调度实现高效的长上下文微调

Skrull: Towards Efficient Long Context Fine-tuning through Dynamic Data Scheduling

School of Advanced Interdisciplinary Sciences, University of Chinese Academy of Sciences(中国科学院大学先进交叉学科学院);State Key Lab of Processors, Institute of Computing Technology, CAS(中国科学院计算技术研究所 processors 国家重点实验室);Alibaba Group(阿里巴巴集团);Sun Yat-sen University(中山大学)

Hongtao Xu, Wenting Shen, Yuanxin Wei, Ang Wang, Guo Runfan, Tianxing Wang, Yong Li, Mingzhen Li, Weile Jia

AI总结:

Skrull通过动态数据调度提升长上下文微调效率,实现高效训练和性能优化。

摘要:

长上下文监督微调(Long-SFT)在提升大型语言模型(LLMs)在长上下文任务上的性能方面起着关键作用。为了使LLMs适应长上下文场景,这一过程通常涉及在包含长序列和短序列的混合数据集上进行训练。然而,这种异质序列长度分布对现有训练系统提出了重大挑战,因为它们无法同时实现长和短序列的高效训练,导致Long-SFT的端到端系统性能不理想。在本文中,我们提出了一个关于数据调度的新视角,以解决Long-SFT中异质数据分布带来的挑战。我们提出了Skrull,一种专门设计用于高效长SFT的动态数据调度器。通过动态数据调度,Skrull平衡了长和短序列的计算需求,提高了整体训练效率。此外,我们将调度过程 formulation 为一个联合优化问题,并彻底分析了其中的权衡。基于这些分析,Skrull采用了一个轻量级的调度算法,以在Long-SFT中实现接近零成本的在线调度。最后,我们基于DeepSpeed,一个最先进的分布式训练系统,实现了Skrull。实验结果表明,在实际的长SFT场景中,Skrull在平均上比DeepSpeed高出3.76倍(最高可达7.54倍).

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑