FRUGAL: Memory-Efficient Optimization by Reducing State Overhead for Scalable Training

Philip Zmushko, Aleksandr Beznosikov, Martin Takáč, Samuel Horváth
11/12/2024
cs.LG

No official code found. Best implementation: fzmushko/FRUGAL (6 stars, Apache-2.0, last commit 2024-11-13).

Abstract

With the increase in the number of parameters in large language models, the process of pre-training and fine-tuning increasingly demands larger volumes of GPU memory. A significant portion of this memory is typically consumed by the optimizer state. To overcome this challenge, recent approaches such as low-rank adaptation (LoRA (Hu et al., 2021)), low-rank gradient projection (GaLore (Zhao et al., 2024)), and blockwise optimization (BAdam (Luo et al., 2024)) have been proposed. However, in all these algorithms, the $\textit{effective rank of the weight updates remains low-rank}$, which can lead to a substantial loss of information from the gradient. This loss can be critically important, especially during the pre-training stage. In this paper, we introduce $\texttt{FRUGAL}$ ($\textbf{F}$ull-$\textbf{R}$ank $\textbf{U}$pdates with $\textbf{G}$r$\textbf{A}$dient sp$\textbf{L}$itting), a new memory-efficient optimization framework. $\texttt{FRUGAL}$ leverages gradient splitting to perform low-dimensional updates using advanced algorithms (such as Adam), while updates along the remaining directions are executed via state-free methods like SGD or signSGD (Bernstein et al., 2018). Our framework can be integrated with various low-rank update selection techniques, including GaLore and BAdam. We provide theoretical convergence guarantees for our framework when using SGDM for low-dimensional updates and SGD for state-free updates. Additionally, our method consistently outperforms concurrent approaches across various fixed memory budgets, achieving state-of-the-art results in pre-training and fine-tuning tasks while balancing memory efficiency and performance metrics.

View on arXivView PDF

Code Implementations(1)

fzmushko/FRUGALCommunity100%
Apache-2.0
61Shell, PythonNov 11, 20241 years agoApache-2.0

Cite this paper

@article{zmushko2024frugal,
  title  = {FRUGAL: Memory-Efficient Optimization by Reducing State Overhead for Scalable Training},
  author = {Philip Zmushko and Aleksandr Beznosikov and Martin Takáč and Samuel Horváth},
  year   = {2024},
  eprint = {2411.07837},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.07837v3},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.07837.svg)](https://codeofpaper.com/paper/2411.07837)

Discussion