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

FOAM:用于内存高效大语言模型训练的阻塞状态折叠

FOAM: Blocked State Folding for Memory-Efficient LLM Training

National Key Laboratory of Parallel and Distributed Computing(并行与分布式计算国家重点实验室);College of Computer Science and Technology(计算机科学与技术学院);National University of Defense Technology(国防科技大学)

Ziqing Wen, Jiahuan Wang, Ping Luo, Dongsheng Li, Tao Sun

AI总结:

FOAM通过计算块级梯度均值压缩优化器状态,并引入残差校正以恢复丢失信息,从而减少内存开销并加速收敛。

摘要:

大型语言模型(LLMs)因其大规模参数和广泛训练数据而表现出色,但其规模导致训练过程中存在显著的内存瓶颈,尤其是在使用内存密集型优化器如Adam时。现有内存高效方法通常依赖奇异值分解(SVD)、投影或权重冻结等技术,这些方法可能带来显著的计算开销,需要额外的内存进行投影,或降低模型性能。本文提出Folded Optimizer with Approximate Moment(FOAM),通过计算块级梯度均值压缩优化器状态,并引入残差校正以恢复丢失信息。理论上,FOAM在标准非凸优化设置下实现与Vanilla Adam相同的收敛速度。实验表明,FOAM可消除多达90%的优化器状态内存开销并加速收敛。此外,FOAM与其他内存高效优化器兼容,能够提供与全秩和现有内存高效基线相媲美的性能和吞吐量。代码可在https://github.com/zqOuO/FOAM上获得。

英文摘要:

Large language models (LLMs) have demonstrated remarkable performance due to their large parameter counts and extensive training data. However, their scale leads to significant memory bottlenecks during training, especially when using memory-intensive optimizers like Adam. Existing memory-efficient approaches often rely on techniques such as singular value decomposition (SVD), projections, or weight freezing, which can introduce substantial computational overhead, require additional memory for projections, or degrade model performance. In this paper, we propose Folded Optimizer with Approximate Moment (FOAM), a method that compresses optimizer states by computing block-wise gradient means and incorporates a residual correction to recover lost information. Theoretically, FOAM achieves convergence rates equivalent to vanilla Adam under standard non-convex optimization settings. Empirically, FOAM eliminates up to 90\% of the memory overhead of optimizer states and accelerates convergence. Furthermore, FOAM is compatible with other memory-efficient optimizers, delivering performance and throughput that match or surpass both full-rank and existing memory-efficient baselines. Code is available at https://github.com/zqOuO/FOAM.

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

↑