arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.26327cs.LG
收藏

重新参数化Shampoo和SOAP用于子空间基更新和BFloat16存储

Reparametrizing Shampoo and SOAP for Subspace Basis Updates and BFloat16 Storage

Mila & Université de Montréal Microsoft(Mila与蒙特利尔大学微软公司);Concordia University & Mila(康科德大学与Mila);University of Central Florida(中央佛罗里达大学)

Alan Milligan, Zikun Xu, Simon Lacoste-Julien, Felix Dangel, Wu Lin

AI总结:

本文通过重新参数化预条件器,在子空间中仅更新部分基向量,结合QR分解支持BFloat16存储,降低了Shampoo类方法的计算和内存开销,并缓解了低精度存储带来的性能下降。

摘要:

基于Shampoo的方法,如KL-Shampoo和SOAP,在训练神经网络中表现出强大的性能,并依赖于QR分解。由于现有的QR实现需要单精度(FP32)算术且计算成本高,当预条件矩阵较大时,这些方法变得时间和内存密集。此外,使用BFloat16(BFP16)存储以减少内存使用会降低基于Shampoo的方法的性能。我们提出了一种预条件器的重新参数化,支持BFP16存储,并通过将更新的基向量与未改变的基向量结合形成完整基。通过在子空间中通过QR分解仅更新部分基,我们的方法减少了计算开销,同时缓解了BFP16存储导致的性能下降。我们的方法广泛适用于使用QR分解的基于Shampoo的方法,包括KL-Shampoo、SOAP和KL-SOAP。特别是,它改善了SOAP和KL-SOAP在BFP16存储下的性能,使KL-SOAP能够匹配或超过KL-Shampoo。总体而言,我们的方法使基于Shampoo的方法更加内存和时间高效。

英文摘要:

Shampoo-based methods, such as KL-Shampoo and SOAP, have demonstrated strong performance in training neural networks and rely on QR decomposition. Because existing QR implementations require single-precision (FP32) arithmetic and remain computationally expensive, these methods become time- and memory-intensive when their preconditioning matrices are large. Moreover, using BFloat16 (BFP16) storage to reduce memory usage can degrade the performance of Shampoo-based methods. We propose a reparametrization of the preconditioner that supports BFP16 storage and forms a complete basis by combining updated basis vectors with unchanged ones. By updating only part of the basis through QR decomposition in a subspace, our approach reduces computational overhead while mitigating the performance degradation caused by BFP16 storage. Our approach applies broadly to Shampoo-based methods that employ QR decomposition, including KL-Shampoo, SOAP, and KL-SOAP. In particular, it improves the performance of SOAP and KL-SOAP under BFP16 storage, enabling KL-SOAP to match or exceed KL-Shampoo. Overall, our approach makes Shampoo-based methods more memory- and time-efficient.

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

↑