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

一种用于训练大语言模型的内存高效随机子空间优化方法

A Memory Efficient Randomized Subspace Optimization Method for Training Large Language Models

Beijing International Center for Mathematical Research, Peking University(北京大学北京数学科学中心);Center for Data Science, Peking University(北京大学数据科学中心);Center for Machine Learning Research, Peking University(北京大学机器学习研究中心)

Yiming Chen, Yuan Zhang, Yin Liu, Kun Yuan, Zaiwen Wen

AI总结:

针对大语言模型训练的内存挑战,本文提出随机子空间优化框架,通过分解高维问题为低维子问题并迭代优化,同时减少激活和优化器状态内存使用,提供收敛保证,实验验证其效率与GaLore、Adam相当。

摘要:

训练大语言模型(LLMs)相关的内存挑战已成为关键问题,尤其是在使用Adam优化器时。为解决这一问题,众多内存高效技术被提出,其中GaLore作为旨在减少优化器状态内存占用的显著例子脱颖而出。然而,这些方法并未缓解激活带来的内存负担,使其不适用于涉及长上下文序列或大型小批量的场景。此外,文献中对其收敛特性的理解仍不充分。在本工作中,我们引入了一个用于预训练和微调LLMs的随机子空间优化框架。我们的方法将高维训练问题分解为一系列低维子问题。在每次迭代中,选择一个随机子空间,并优化该子空间内的参数。这种结构化的维度降低使我们的方法能够同时减少激活和优化器状态的内存使用。我们建立了全面的收敛保证,并推导了各种场景下的收敛速率,以适应不同的优化策略来解决子问题。大量实验验证了我们方法的卓越内存和通信效率,其性能可与GaLore和Adam相媲美。

英文摘要:

The memory challenges associated with training Large Language Models (LLMs) have become a critical concern, particularly when using the Adam optimizer. To address this issue, numerous memory-efficient techniques have been proposed, with GaLore standing out as a notable example designed to reduce the memory footprint of optimizer states. However, these approaches do not alleviate the memory burden imposed by activations, rendering them unsuitable for scenarios involving long context sequences or large mini-batches. Moreover, their convergence properties are still not well-understood in the literature. In this work, we introduce a Randomized Subspace Optimization framework for pre-training and fine-tuning LLMs. Our approach decomposes the high-dimensional training problem into a series of lower-dimensional subproblems. At each iteration, a random subspace is selected, and the parameters within that subspace are optimized. This structured reduction in dimensionality allows our method to simultaneously reduce memory usage for both activations and optimizer states. We establish comprehensive convergence guarantees and derive rates for various scenarios, accommodating different optimization strategies to solve the subproblems. Extensive experiments validate the superior memory and communication efficiency of our method, achieving performance comparable to GaLore and Adam.

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

↑