SubTrack your Grad: Gradient Subspace Tracking for Memory and Time Efficient Full-Parameter LLM Training

Sahar Rajabi, Nayeema Nonta, Sirisha Rambhatla · OpenReview

Abstract

Training Large Language Models (LLMs) demand significant time and computational resources due to their large model sizes and optimizer states. To overcome these challenges, recent methods, such as BAdam, employ partial weight updates to enhance time and memory efficiency, though sometimes at the cost of performance. Others, like GaLore, focus on maintaining performance while optimizing memory usage through full parameter training, but may incur higher time complexity. By leveraging the low-rank structure of the gradient and the Grassmannian geometry, we propose SubTrack-Grad, a subspace tracking-based optimization method that efficiently tracks the evolving gradient subspace by incorporating estimation errors and previously identified subspaces. SubTrack-Grad delivers better or on-par results compared to GaLore, while significantly outperforming BAdam, which, despite being time-efficient, compromises performance. SubTrack-Grad reduces wall-time by up to 20.57% on GLUE tasks (15% average reduction) and up to 65% on SuperGLUE tasks (22% average reduction) compared to GaLore. Notably, for a 3B parameter model, GaLore incurred a substantial 157% increase in wall-time compared to full-rank training, whereas SubTrack-Grad exhibited a 31% increase, representing a 49% reduction in wall-time, while enjoying the same memory reductions as GaLore.

Introduction

Training Large Language Models (LLMs) is a resource-intensive endeavor. While model parameters are often the focus, the primary memory bottleneck is frequently the optimizer states. For example, the standard Adam optimizer requires storing momentum and variance for every parameter, effectively tripling the VRAM needed just to hold the model states.

Low-rank methods like GaLore attempt to mitigate this by projecting gradients into a smaller subspace. However, these methods typically rely on Singular Value Decomposition (SVD) to periodically update the subspace. SVD is computationally expensive and can cause training instability due to periodic "resets" of the subspace, leading to erratic loss curves and significant time overhead.

Methodology

SubTrack++ (SubTrack-Grad) shifts the paradigm from periodic subspace recalculation to continuous tracking. The method is built on three pillars:

  1. Grassmannian Subspace Tracking: Instead of full SVD updates, SubTrack++ treats the subspace as a point on a Grassmann manifold—the mathematical space of all possible subspaces. It employs efficient rank-1 updates to move the current subspace along a "geodesic" (the shortest path on a curved surface). This geometric approach is significantly faster than SVD.
Subspace tracking on the Grassmann manifold using geodesic movement.
  1. Projection-Aware Optimizer: When the subspace shifts, the Adam optimizer's internal moving averages become misaligned. SubTrack++ mathematically rotates these states to ensure they remain valid in the new coordinate system, maintaining training smoothness.
  2. Recovery Scaling: To compensate for information lost during low-rank projection, SubTrack++ rescales discarded gradient components based on optimizer statistics, enhancing overall performance.

Experimental Setup

The researchers evaluated SubTrack++ across several benchmarks:

  • Pre-training: Llama-based models (60M to 7B parameters) on the C4 dataset.
  • Fine-tuning: RoBERTa-Base and RoBERTa-Large on GLUE and SuperGLUE.
  • Instruction Following: Llama-2-7B on the Alpaca dataset.

Key Results

SubTrack++ achieves a "triple win" by optimizing speed, memory, and convergence simultaneously.

Comparison of SubTrack++ against baselines across evaluation loss, peak memory, and wall-time.
  • Efficiency: It reduces pre-training wall-clock time by up to 65% and fine-tuning time by 36% compared to GaLore, while maintaining the same low memory footprint. This allows 7B parameter models to be trained on consumer-grade hardware like an RTX A6000.
  • Performance: In a 100k-step pre-training run for Llama-7B, SubTrack++ achieved a lower evaluation loss (3.37) than GaLore (4.64) in the same timeframe.
  • Regularization: The low-rank projection appears to act as implicit regularization, sometimes allowing SubTrack++ to outperform full-rank training by focusing on signal over noise.

Conclusion and Future Work

SubTrack++ demonstrates that geometric tracking is a viable and efficient alternative to brute-force matrix factorization for LLM training. Future work includes extending the projection-aware logic to other optimizers like LAMB or Lion and scaling the method to models exceeding 70B parameters. Additionally, further investigation into hyperparameter sensitivity regarding the manifold step-size will help generalize the method's stability across diverse architectures.

Summary updated

BibTeX
@inproceedings{rajabi2025subtrack,
  author = {Sahar Rajabi and Nayeema Nonta and Sirisha Rambhatla},
  title = {{SubTrack your Grad: Gradient Subspace Tracking for Memory and Time Efficient Full-Parameter LLM Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=6geRIdlFWJ},
}
Figure