Pre-training foundation large language models has historically required massive compute clusters, largely due to the memory footprint of optimizer states rather than the model weights themselves. While parameter-efficient fine-tuning methods such as Low-Rank Adaptation (LoRA) freeze weights and introduce small adapter matrices, they fail when applied to pre-training from scratch because they restrict parameter updates to a fixed, static low-rank manifold.
Gradient Low-Rank Projection (GaLore), introduced by researchers from Caltech, UT Austin, and Meta, presents an alternative mathematical formulation. Rather than constraining the weight matrices to be low-rank, GaLore exploits the empirical fact that the weight gradients themselves reside in slowly changing low-rank subspaces during training. By projecting weight gradients into dynamic orthogonal subspaces via periodic singular value decomposition (SVD), GaLore maintains full-rank parameter expressivity while reducing optimizer state memory by up to 65.5% in standard precision and over 82% when paired with 8-bit quantization.
The Optimizer Memory Bottleneck in Pre-Training
To understand the memory challenge during neural network training, consider the memory allocation per parameter in a standard 16-bit mixed-precision training pipeline using the AdamW optimizer:
- Model Parameters (BF16/FP16): bytes. For a 7-billion-parameter model, weights consume approximately 14 GB of VRAM.
- Gradients (BF16/FP16): bytes (14 GB for a 7B model).
- Optimizer States (FP32 First and Second Moments): Standard AdamW tracks the running mean of gradients () and the running uncentered variance () in 32-bit floating-point format to ensure numerical stability. This requires bytes (56 GB for a 7B model).
- Master Weights (FP32): Standard mixed-precision engines often maintain an FP32 copy of the weights for gradient accumulation, requiring an additional bytes (28 GB).
Optimizer states alone account for more than half of the non-activation memory footprint during pre-training. While methods like ZeRO-1 shard optimizer states across distributed nodes, single-node or single-GPU training remains heavily bottlenecked.
+-------------------------------------------------------------------------+
| 7B Parameter Model Memory Footprint (BF16) |
+-------------------------------------------------------------------------+
| Model Weights (BF16) | 14 GB |
| Gradients (BF16) | 14 GB |
| AdamW Moments M_t, V_t | 56 GB <-- Dominant memory bottleneck |
| FP32 Master Weights | 28 GB |
+-------------------------------------------------------------------------+
| Total Parameter & State | 112 GB (Excluding Activations) |
+-------------------------------------------------------------------------+Methods such as LoRA circumvent optimizer memory during fine-tuning by freezing the pre-trained weight matrix and training two low-rank matrices and such that . However, during pre-training from scratch, is randomly initialized. Constraining to a static rank- parameterization restricts the model to a low-dimensional manifold, preventing it from learning the full-rank representations required for general language understanding.
The Theoretical Foundation of Low-Rank Gradients
The foundational insight behind GaLore is that while the weight matrix must remain full-rank, the gradient matrix has an intrinsic low-rank structure during backpropagation.
In a deep transformer layer , the forward pass computes activations . During backpropagation with a batch size , the gradient of the loss with respect to the weight matrix is given by the outer product of the backpropagated error vectors and the input activations :
Because the matrix product is formed by multiplying a transposed matrix by a matrix, the mathematical rank of the gradient matrix is upper-bounded by the batch size:
Even with large cumulative batch sizes, empirical spectrum analysis reveals that the singular values of gradient matrices in transformers decay rapidly. A small set of dominant singular vectors captures the vast majority of the gradient energy, and these dominant directions evolve slowly across consecutive optimization iterations.

The GaLore Algorithm: SVD Subspace Projections
GaLore exploits gradient low-rank structure by projecting the full-rank gradient into an orthogonal low-rank subspace before passing it to the optimizer. The optimizer maintains its state tensors exclusively within this compact subspace.
1. Orthogonal Subspace Construction
For a weight matrix with , GaLore periodically performs Singular Value Decomposition on the gradient matrix :
The left projection matrix is formed by extracting the first columns of , corresponding to the largest singular values. By construction, has orthonormal columns:
When , a right projection matrix is constructed from the first columns of instead.
2. Gradient Projection and Low-Rank Optimizer Tracking
The full gradient is projected into the -dimensional subspace:
Rather than tracking moments for the matrix, the optimizer (such as AdamW) updates its first and second moment buffers directly on :
Here, represents the low-rank optimization step.
3. Full-Rank Weight Update
To apply the update to the actual model weights, is projected back into the ambient parameter space:
where is the learning rate and is a constant scaling factor (typically or a fixed hyperparameter).
4. Periodic Subspace Rotation
A static subspace projection would constrain parameter updates to a fixed rank- slice. To achieve full-parameter exploration, GaLore updates the projection matrix every steps (typically ):
- At iteration where , compute a new SVD on to obtain .
- Reset or rescale the low-rank optimizer states and for the new subspace basis.
- Continue standard gradient projection until the next interval .
Because the subspace basis continuously rotates across the optimization trajectory, the sum of updates over intervals spans the full rank of :
This rotation allows GaLore to achieve the same expressive convergence as full-rank gradient descent while keeping the active optimizer memory footprint bounded to at every individual time step.
Memory Accounting: AdamW vs. LoRA vs. GaLore
The practical benefit of GaLore is demonstrated through direct memory accounting for a linear layer with dimensions and low-rank dimension :
| Method | Trainable Weights | Gradients | Optimizer States (FP32) | Total Layer Memory | | :--- | :--- | :--- | :--- | :--- | | Standard AdamW | bytes | bytes | bytes | bytes | | LoRA () | bytes | bytes | bytes | bytes | | GaLore () | bytes | bytes | bytes | bytes | | GaLore 8-Bit () | bytes | bytes | bytes | bytes |
For a standard projection layer in a 7B model where and rank :
- Standard AdamW Optimizer States: .
- GaLore Optimizer States (): (plus for storing ), representing a 96.1% reduction in per-layer optimizer memory.
Single-GPU 7B Pre-Training
When combined with per-layer gradient checkpointing and per-layer weight updates (where gradients are computed, projected, applied, and freed immediately during the backward pass rather than holding the entire model's gradients simultaneously), memory usage drops substantially:
+-------------------------------------------------------------------------+
| LLaMA-7B Pre-Training Memory on a Single GPU (VRAM) |
+-------------------------------------------------------------------------+
| Baseline 16-bit AdamW | ~58.0 GB (Requires 80GB A100 / H100) |
| GaLore (FP32 Optimizer) | ~31.2 GB |
| GaLore 8-Bit AdamW | ~21.8 GB |
+-------------------------------------------------------------------------+
| Single NVIDIA RTX 4090 | 24.0 GB VRAM Capacity (Fits comfortably) |
+-------------------------------------------------------------------------+As demonstrated in the original paper benchmarks, an 8-bit GaLore configuration makes it possible to pre-train a 7B LLaMA model from scratch on a single 24 GB consumer GPU (such as an NVIDIA RTX 4090) without requiring distributed tensor parallelism or CPU parameter offloading.
Empirical Validation and Downstream Evaluation
To verify whether low-rank gradient projection harms pre-training convergence, the authors evaluated GaLore against full-rank AdamW baselines on the C4 dataset across 1B and 7B parameter architectures.
Pre-Training Perplexity on C4 (19.7B Tokens)
| Model Architecture | Optimizer | Rank () | Memory (Optimizer) | Validation Perplexity | | :--- | :--- | :--- | :--- | :--- | | LLaMA-1B | Standard AdamW | Full () | 8.0 GB | 15.39 | | LLaMA-1B | LoRA | 128 | 0.9 GB | 19.42 | | LLaMA-1B | GaLore | 128 | 1.8 GB | 15.42 | | LLaMA-7B | Standard AdamW | Full () | 56.0 GB | 14.61 | | LLaMA-7B | GaLore | 128 | 12.8 GB | 14.65 | | LLaMA-7B | GaLore 8-Bit | 128 | 6.5 GB | 14.67 |
The evaluation demonstrates that while LoRA suffers significant perplexity degradation during pre-training (19.42 vs 15.39 on LLaMA-1B), GaLore matches the perplexity of standard AdamW within 0.03 to 0.06 points while cutting optimizer memory by up to 88.4%.
Zero-Shot Downstream Benchmarks (LLaMA-7B Pre-Trained)
Downstream task evaluations on checkpoints pre-trained with GaLore confirm that representation quality transfers across evaluation suites:
| Benchmark | Standard AdamW Baseline | GaLore () | | :--- | :--- | :--- | | MMLU (5-shot) | 25.8% | 25.7% | | ARC-Challenge (0-shot) | 37.1% | 37.4% | | ARC-Easy (0-shot) | 66.8% | 66.5% | | HellaSwag (0-shot) | 62.4% | 62.1% | | PIQA (0-shot) | 75.3% | 75.1% | | WinoGrande (0-shot) | 63.8% | 64.0% |
Fine-Tuning Performance on GLUE
When applied to downstream fine-tuning on RoBERTa-Base across the GLUE benchmark suite, GaLore achieves an average score of 85.89, slightly outperforming standard full fine-tuning (85.75) and LoRA (85.61), demonstrating flexibility across both pre-training and adaptation phases.
Implementation and Systems Considerations
Integrating GaLore into existing PyTorch training pipelines requires minimal structural changes, as provided in the official open-source repository:
from galore_torch import GaLoreAdamW8bit
# Partition parameters into projected 2D layers and standard 1D vectors
galore_params = []
standard_params = []
for name, param in model.named_parameters():
if param.ndim == 2 and "embed" not in name:
galore_params.append(param)
else:
standard_params.append(param)
param_groups = [
{"params": standard_params},
{
"params": galore_params,
"rank": 128,
"update_proj_gap": 200,
"scale": 0.25,
"proj_type": "std",
},
]
optimizer = GaLoreAdamW8bit(param_groups, lr=0.01)Several practical considerations govern deployment in production training jobs:
- Subspace Update Gap (): Setting steps balances computational overhead with subspace tracking. Recomputing the SVD every 200 steps accounts for less than 2% of overall wall-clock training time. Setting too low increases SVD overhead, while setting too high causes the projection basis to lag behind the shifting gradient trajectory.
- Rank Selection (): Empirical tests indicate that is sufficient for 1B to 7B models. For larger models (e.g. 13B to 70B), increasing to 256 or 512 preserves full convergence while still providing over 80% memory savings relative to full-rank optimizer states.
- Compatibility with Distributed Training: GaLore operates independently on each rank during Data Parallel (DDP) and Fully Sharded Data Parallel (FSDP) training. When combined with FSDP, GaLore further reduces the communication and per-node optimizer memory envelope, enabling higher micro-batch sizes and better hardware utilization.
Summary
By identifying and exploiting the low-rank properties of weight gradients rather than constraining weight matrices directly, GaLore bridges the gap between memory-efficient adaptation and full-parameter pre-training. The ability to periodically re-anchor low-rank optimizer projections provides an effective mathematical mechanism for training modern foundation models under constrained GPU memory budgets.
Sources
- GaLore: Memory-Efficient LLM Training by Gradient Low-Rank Projection (Zhao et al., ICML 2024 / arXiv:2403.03507)
- Official GaLore GitHub Repository (jiaweizzhao/GaLore)
- LoRA: Low-Rank Adaptation of Large Language Models (Hu et al., 2021)
- PyTorch Fully Sharded Data Parallel (FSDP) Architecture Paper (Zhao et al., 2023)



