arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.08756cs.DCcs.LG
收藏

优化大型模型训练中的重叠激活重计算

Optimizing Large Model Training through Overlapped Activation Recomputation

Zhejiang University(浙江大学);Huawei Cloud(华为云)

Ping Chen, Wenjie Zhang, Shuibing He, Weijian Chen, Siling Yang, Kexin Huang, Yanlong Yin, Xuan Zhan, Yingjie Gu, Zhuwei Peng, Yi Zheng, Zhefeng Wang, Gang Chen

AI总结:

针对大型模型训练中重计算开销高的问题,提出Lynx框架,通过重叠重计算与通信、启发式调度及重计算感知分区,将GPT模型训练性能提升至1.37倍。

摘要:

大型模型训练通常使用重计算来缓解内存压力,并使用流水线来利用数据、张量和设备的并行性。然而,现有的重计算方法在训练真实世界模型时可能会产生高开销,因为它们在关键训练路径中按需执行。在本文中,我们提出了Lynx,一种新的重计算框架,通过将重计算与训练流水线中的通信重叠来减少开销。为了减少重计算策略的巨大搜索空间,我们提出了一种基于启发式的重计算调度算法,该算法基于大型DNN模型中存在相同结构的观察,因此我们可以将相同的调度策略应用于所有此类结构。此外,我们提出了一种重计算感知的模型分区方法,以平衡每个阶段的执行时间,从而提高训练吞吐量。我们使用1.3B-23B参数的GPT模型进行的综合评估表明,Lynx的性能比现有重计算方法提高了高达1.37倍。

英文摘要:

Large model training often uses recomputation to alleviate memory pressure and pipelines to exploit the parallelism of data, tensors, and devices. However, existing recomputation approaches may incur high overhead when training real-world models, as they are executed on demand in the critical training path. In this paper, we present Lynx, a new recomputation framework to reduce overhead by overlapping recomputation with communication in training pipelines. To reduce the large search space for recomputation strategies, we propose a heuristic-based recomputation scheduling algorithm, which is based on the observation that there are identical structures in large DNN models so that we can apply the same scheduling policy to all such structures. Additionally, we propose a recomputation-aware model partitioning method to balance each stage's execution time for improved training throughput. Our comprehensive evaluation using GPT models with 1.3B-23B parameters shows that Lynx outperforms existing recomputation approaches by up to 1.37x.

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

↑