arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2301.08658cs.DC
收藏

ATP:基础模型的自适应张量并行

ATP: Adaptive Tensor Parallelism for Foundation Models

Shenggan Cheng, Ziming Liu, Jiangsu Du, Yang You

摘要:

基础模型在广泛的应用中具有令人印象深刻的性能和泛化能力。模型规模的不断增大给训练带来了巨大的挑战。张量并行是目前几乎所有基础模型训练中使用的关键技术,并且对整体训练性能具有显著影响。然而,当前机器学习框架中的张量并行在拟合各种互连拓扑时错过了优化机会。在这项工作中,我们提出了ATP,一个自适应张量并行框架的基础模型,它可以自动选择最佳的并行策略在不同的互连。我们提出了基于2D设备网格的列和行优先张量并行,并构造了一个搜索空间。结合层次通信矩阵,ATP可以在搜索空间中确定最优策略。我们还提出了基于块的重叠,以减少通信开销。我们的评估表明,ATP在各种模型尺寸和互连方面的表现始终优于最先进的方法,在特定互连上实现了高达37-64%的端到端训练性能提升。基于我们的理论模型,ATP的通信开销随着规模的增加而减少,这表明了一个质的飞跃。

英文摘要:

Foundation models have impressive performance and generalization capabilities across a wide range of applications. The increasing size of the models introduces great challenges for the training. Tensor parallelism is a critical technique that is currently used in almost all foundation model training and has a significant impact on overall training performance. However, current tensor parallelism in machine learning frameworks misses optimization opportunities in fitting various interconnection topologies. In this work, we present ATP, an adaptive tensor parallelism framework for foundation models, which can automatically select the optimal parallel strategy on different interconnections. We propose column- and row-first tensor parallelism based on 2D device meshes and construct a search space. Combined with the hierarchical communication matrix, ATP can identify the optimal strategy in the search space. We also propose chunk-based overlapping to reduce communication overhead. Our evaluations show ATP consistently outperforms the state-of-the-art approaches for various model sizes and interconnects, achieving end-to-end training performance improvements of up to 37-64% on specific interconnects. Based on our theoretical model, the communication overhead of ATP decreases with scaling, indicating a qualitative leap forward.

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

↑