arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.12857cs.LGcs.AIcs.CL
收藏

基于在线子空间下降的内存高效LLM训练

Memory-Efficient LLM Training with Online Subspace Descent

The University of Texas at Austin(德克萨斯大学奥斯汀分校)

Kaizhao Liang, Bo Liu, Lizhang Chen, Qiang Liu

AI总结:

本文提出Online Subspace Descent优化器,通过在线PCA替代SVD更新投影矩阵,首次为任意更新规则提供收敛保证,在LLaMA预训练中性能优于现有低秩方法且逼近全秩基线。

摘要:

最近,一系列内存高效的LLM训练算法获得了广泛关注。这些方法利用梯度的低秩结构,通过奇异值分解(SVD)找到投影矩阵,将优化器状态投影到子空间中。然而,这些算法的收敛性高度依赖于其投影矩阵的更新规则。在本工作中,我们首次为投影矩阵的任意更新规则提供了收敛保证。该保证普遍适用于可用Hamiltonian Descent分析的优化器,包括LION、Adam等最常见优化器。受理论启发,我们提出Online Subspace Descent,一种无需SVD的子空间下降优化器新家族。Online Subspace Descent不使用特征向量更新投影矩阵,而是通过在线PCA更新。该方法灵活且仅引入最小训练开销。我们表明,在C4数据集上预训练60M至7B参数的LLaMA模型时,Online Subspace Descent在不同设置下比最先进低秩训练方法获得更低困惑度和更好下游任务性能,缩小了与全秩基线的差距。

英文摘要:

Recently, a wide range of memory-efficient LLM training algorithms have gained substantial popularity. These methods leverage the low-rank structure of gradients to project optimizer states into a subspace using projection matrix found by singular value decomposition (SVD). However, convergence of these algorithms is highly dependent on the update rules of their projection matrix. In this work, we provide the \emph{first} convergence guarantee for arbitrary update rules of projection matrix. This guarantee is generally applicable to optimizers that can be analyzed with Hamiltonian Descent, including most common ones, such as LION, Adam. Inspired by our theoretical understanding, we propose Online Subspace Descent, a new family of subspace descent optimizer without SVD. Instead of updating the projection matrix with eigenvectors, Online Subspace Descent updates the projection matrix with online PCA. Online Subspace Descent is flexible and introduces only minimum overhead to training. We show that for the task of pretraining LLaMA models ranging from 60M to 7B parameters on the C4 dataset, Online Subspace Descent achieves lower perplexity and better downstream tasks performance than state-of-the-art low-rank training methods across different settings and narrows the gap with full-rank baselines.

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

↑