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

SMMF:用于内存高效优化的方阵化动量分解

SMMF: Square-Matricized Momentum Factorization for Memory-Efficient Optimization

Kwangryeol Park, Seulki Lee

AI总结:

本文提出 SMMF(方阵化动量分解),一种内存高效优化器,通过方阵化和一次性矩阵分解支持任意秩动量张量的灵活分解,相比 Adam 等优化器内存需求降低高达 96%,并在理论分析和 CNN、Transformer 实验中验证了其低内存与高性能优势。

摘要:

我们提出了 SMMF(Square-Matricized Momentum Factorization,方阵化动量分解),这是一种内存高效的优化器,能够将广泛使用的自适应学习率优化器(如 Adam)的内存需求降低高达 96%。SMMF 基于所提出的方阵化和一次性单一矩阵分解,能够在优化过程中对一阶和二阶动量张量的任意秩(形状)进行灵活高效的分解。由此,它可以有效适用于任意秩(形状)的动量张量,即偏置、矩阵以及任意 rank-d 张量,这些张量普遍存在于各种深度模型架构中,如 CNN(高秩)和 Transformers(低秩);相比之下,现有的内存高效优化器仅适用于特定的(rank-2)动量张量,例如线性层。我们对 SMMF 进行了遗憾界分析,结果表明其收敛性与 AdamNC 等非内存高效的自适应学习率优化器相似,这为其具备竞争力的优化能力提供了理论基础。在我们的实验中,与 Adafactor、CAME 和 SM3 等最先进的内存高效优化器相比,SMMF 最多可节省 96% 的内存,同时在各种 CNN 和 Transformer 任务上实现了相当的模型性能。

英文摘要:

We propose SMMF (Square-Matricized Momentum Factorization), a memory-efficient optimizer that reduces the memory requirement of the widely used adaptive learning rate optimizers, such as Adam, by up to 96%. SMMF enables flexible and efficient factorization of an arbitrary rank (shape) of the first and second momentum tensors during optimization, based on the proposed square-matricization and one-time single matrix factorization. From this, it becomes effectively applicable to any rank (shape) of momentum tensors, i.e., bias, matrix, and any rank-d tensors, prevalent in various deep model architectures, such as CNNs (high rank) and Transformers (low rank), in contrast to existing memory-efficient optimizers that applies only to a particular (rank-2) momentum tensor, e.g., linear layers. We conduct a regret bound analysis of SMMF, which shows that it converges similarly to non-memory-efficient adaptive learning rate optimizers, such as AdamNC, providing a theoretical basis for its competitive optimization capability. In our experiment, SMMF takes up to 96% less memory compared to state-of-the-art memory efficient optimizers, e.g., Adafactor, CAME, and SM3, while achieving comparable model performance on various CNN and Transformer tasks.

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

↑