arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2407.03641cs.LG
收藏

在单GPU上学习可扩展的Model Soup:一种高效的子空间训练策略

Learning Scalable Model Soup on a Single GPU: An Efficient Subspace Training Strategy

Shanghai Jiao Tong University(上海交通大学);The Hong Kong University of Science and Technology(香港科技大学);Southern University of Science and Technology(南方科技大学);University of Warwick(华威大学)

Tao Li, Weisen Jiang, Fanghui Liu, Xiaolin Huang, James T. Kwok

AI总结:

针对Learned-Soup内存和时间开销大的问题,提出MEHL-Soup(+),通过超平面优化和块坐标梯度下降实现单GPU上的高效模型soup构建,在提升测试准确率的同时大幅降低内存并加速9倍。

摘要:

预训练加微调被从业者广泛采用。通过探索各种超参数配置,可以利用“model soups”来提升性能。Learned-Soup作为model soups的一个变体,显著提升了性能,但由于需要同时加载所有微调模型,以及构建包含所有微调模型的庞大计算图,其存在巨大的内存和时间开销。在本文中,我们提出了Memory Efficient Hyperplane Learned Soup(MEHL-Soup)来解决这一问题,该方法将learned soup表述为一个超平面优化问题,并引入块坐标梯度下降来学习混合系数。在每次迭代中,MEHL-Soup只需加载少数微调模型,并构建仅包含一个组合模型的计算图。我们进一步以逐层的方式将MEHL-Soup扩展为MEHL-Soup+。在各种ViT模型和数据集上的实验结果表明,MEHL-Soup(+)在测试准确率上优于Learned-Soup(+),并且内存使用量减少了13倍以上。此外,MEHL-Soup(+)可以在单个GPU上运行,与Learned-Soup相比,在soup构建上实现了9倍的加速。代码发布于https://github.com/nblt/MEHL-Soup。

英文摘要:

Pre-training followed by fine-tuning is widely adopted among practitioners. The performance can be improved by "model soups"~\cite{wortsman2022model} via exploring various hyperparameter configurations.The Learned-Soup, a variant of model soups, significantly improves the performance but suffers from substantial memory and time costs due to the requirements of (i) having to load all fine-tuned models simultaneously, and (ii) a large computational graph encompassing all fine-tuned models. In this paper, we propose Memory Efficient Hyperplane Learned Soup (MEHL-Soup) to tackle this issue by formulating the learned soup as a hyperplane optimization problem and introducing block coordinate gradient descent to learn the mixing coefficients. At each iteration, MEHL-Soup only needs to load a few fine-tuned models and build a computational graph with one combined model. We further extend MEHL-Soup to MEHL-Soup+ in a layer-wise manner. Experimental results on various ViT models and data sets show that MEHL-Soup(+) outperforms Learned-Soup(+) in terms of test accuracy, and also reduces memory usage by more than $13\times$. Moreover, MEHL-Soup(+) can be run on a single GPU and achieves $9\times$ speed up in soup construction compared with the Learned-Soup. The code is released at https://github.com/nblt/MEHL-Soup.

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

↑