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

OmniBal:通过全宇宙计算平衡实现视觉语言模型的快速指令微调

OmniBal: Towards Fast Instruction-Tuning for Vision-Language Models via Omniverse Computation Balance

Shanghai Jiao Tong University(上海交通大学);SenseTime Research(商汤科技研究院);Central South University(中南大学);Tongji University(同济大学);Beihang University(北航);The Chinese University of Hong Kong(香港中文大学)

Yongqiang Yao, Jingru Tan, Feizhao Zhang, Jiahao Hu, Yazhe Niu, Xin Jin, Bo Li, Pengfei Liu, Ruihao Gong, Dahua Lin, Ningyi Xu

AI总结:

针对视觉语言指令微调模型在3D并行训练中因视觉与语言异构性导致的计算负载不均衡问题,提出全宇宙均衡训练框架OmniBal,从数据、模型和内存三方面优化负载,实现约1.8倍训练加速。

摘要:

视觉语言指令微调模型近期取得了显著的性能提升。在本工作中,我们发现对这些模型进行大规模3D并行训练会导致不同设备间的计算负载不均衡。视觉和语言部分本质上是异构的:它们的数据分布和模型架构差异很大,这影响了分布式训练效率。为了解决这个问题,我们从数据、模型和内存三个角度重新平衡计算负载,实现了各设备间更均衡的计算。具体而言,在数据方面,将实例在设备内部和跨设备分组为新的均衡小批次。模型方面采用基于搜索的方法来实现更均衡的划分。在内存优化方面,我们自适应地调整每个分区的重计算策略,以充分利用可用内存。这三个角度并非独立,而是紧密相连,构成了一个全宇宙均衡训练框架。我们进行了大量实验来验证方法的有效性。与InternVL-Chat的开源训练代码相比,训练时间大幅减少,实现了约1.8倍的加速。我们方法的有效性和泛化性在各种模型和数据集上得到了进一步验证。代码将在https://github.com/ModelTC/OmniBal发布。

英文摘要:

Vision-language instruction-tuning models have recently achieved significant performance improvements. In this work, we discover that large-scale 3D parallel training on those models leads to an imbalanced computation load across different devices. The vision and language parts are inherently heterogeneous: their data distribution and model architecture differ significantly, which affects distributed training efficiency. To address this issue, we rebalance the computational load from data, model, and memory perspectives, achieving more balanced computation across devices. Specifically, for the data, instances are grouped into new balanced mini-batches within and across devices. A search-based method is employed for the model to achieve a more balanced partitioning. For memory optimization, we adaptively adjust the re-computation strategy for each partition to utilize the available memory fully. These three perspectives are not independent but are closely connected, forming an omniverse balanced training framework. Extensive experiments are conducted to validate the effectiveness of our method. Compared with the open-source training code of InternVL-Chat, training time is reduced greatly, achieving about 1.8$\times$ speed-up. Our method's efficacy and generalizability are further validated across various models and datasets. Codes will be released at https://github.com/ModelTC/OmniBal.

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

↑