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

内存高效的4位预条件随机优化

Memory-Efficient 4-bit Preconditioned Stochastic Optimization

National University of Singapore(新加坡国立大学);Singapore Management University(新加坡管理大学)

Jingyang Li, Kuangyu Ding, Kim-Chuan Toh, Pan Zhou

AI总结:

本文针对Shampoo预条件随机优化算法内存开销大的问题,提出对Cholesky因子进行4位量化并结合误差反馈的方法,在保持算法性能的同时显著降低内存占用,并给出了光滑与非光滑设置下的收敛性证明。

摘要:

以Shampoo为代表的预条件随机优化算法,通过在大规模神经网络训练中提供理论收敛优势和实际性能提升,优于一阶优化器。然而,由于非对角预条件矩阵的存储需求,它们带来了显著的内存开销。为了解决这一问题,我们为Shampoo的预条件器引入了4位量化。我们提出了两个关键方法:首先,我们应用Cholesky分解,然后对Cholesky因子进行量化,利用其下三角结构减少内存使用,同时更好地保留谱特性以最小化信息损失。据我们所知,这是首个应用于预条件器Cholesky因子的量化方法。其次,我们在量化过程中引入误差反馈,将Cholesky因子和误差状态高效地存储在同一矩阵的下三角和上三角部分。通过大量实验,我们证明将Cholesky量化与误差反馈相结合,能够在大规模深度学习任务中提升内存效率和算法性能。在理论上,我们还在光滑和非光滑随机优化设置下提供了量化Shampoo的收敛性证明。

英文摘要:

Preconditioned stochastic optimization algorithms, exemplified by Shampoo, outperform first-order optimizers by offering theoretical convergence benefits and practical gains in large-scale neural network training. However, they incur substantial memory overhead due to the storage demands of non-diagonal preconditioning matrices. To address this, we introduce 4-bit quantization for Shampoo's preconditioners. We introduce two key methods: First, we apply Cholesky decomposition followed by quantization of the Cholesky factors, reducing memory usage by leveraging their lower triangular structure while better preserving spectral properties to minimize information loss. To our knowledge, this is the first quantization approach applied to Cholesky factors of preconditioners. Second, we incorporate error feedback in the quantization process, efficiently storing Cholesky factor and error state in the lower and upper triangular parts of the same matrix. Through extensive experiments, we demonstrate that combining Cholesky quantization with error feedback enhances memory efficiency and algorithm performance in large-scale deep-learning tasks. Theoretically, we also provide convergence proofs for quantized Shampoo under both smooth and non-smooth stochastic optimization settings.

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

↑