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

FlashOptim: 用于内存高效训练的优化器

FlashOptim: Optimizers for Memory-Efficient Training

Databricks AI Research(Databricks AI研究院)

Jose Javier Gonzalez Ortiz, Abhay Gupta, Christopher Rinard, Davis Blalock

AI总结:

FlashOptim通过减少每参数内存消耗50%以上,同时保持模型质量和API兼容性,显著提升内存高效训练性能。

摘要:

标准的混合精度神经网络训练需要为每个模型参数分配许多字节的加速器内存。这些字节不仅反映参数本身,还包含其梯度和一个或多个优化器状态变量。每个值通常需要4字节,因此即使训练一个70亿参数模型,对于拥有少于100GB加速器内存的研究人员来说也是不切实际的。我们介绍了FlashOptim,一套优化技术,能够将每参数内存消耗减少超过50%,同时保持模型质量和API兼容性。我们的方法引入了两种关键技术。首先,我们通过找到并利用主权重分割的紧致界来改进主权重分割,从而减少量化误差。其次,我们设计了扩展函数,大幅减少8位优化器状态量化中的误差。结合16位梯度,这些技术将AdamW内存从16字节减少到每参数7字节,或在梯度释放时减少到5字节。它们还使模型检查点大小减少了一半以上。在FlashOptim应用于SGD、AdamW和Lion的实验中,没有任何任务从标准视觉和语言基准中显示出可测量的质量下降,包括Llama-3.1-8B微调。

英文摘要:

Standard mixed-precision training of neural networks requires many bytes of accelerator memory for each model parameter. These bytes reflect not just the parameter itself, but also its gradient and one or more optimizer state variables. With each of these values typically requiring 4 bytes, training even a 7 billion parameter model can be impractical for researchers with less than 100GB of accelerator memory. We introduce FlashOptim, a suite of optimizations that reduces per-parameter memory by over 50% while preserving model quality and API compatibility. Our approach introduces two key techniques. First, we improve master weight splitting by finding and exploiting a tight bound on its quantization error. Second, we design companding functions that greatly reduce the error in 8-bit optimizer state quantization. Together with 16-bit gradients, these techniques reduce AdamW memory from 16 bytes to 7 bytes per parameter, or 5 bytes with gradient release. They also cut model checkpoint sizes by more than half. Experiments with FlashOptim applied to SGD, AdamW, and Lion show no measurable quality degradation on any task from a collection of standard vision and language benchmarks, including Llama-3.1-8B finetuning.

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

↑