OASIS: Online Activation Subspace Learning for Memory-Efficient Training
Organizations: Purdue University · Advanced Micro Devices, Inc. (AMD)
Abstract
Training large language models (LLMs) is constrained by memory requirements, with activations accounting for a substantial fraction of the total footprint. Existing approaches reduce memory using low-rank weight parameterizations or low-rank gradient subspaces for optimizer states, while activation memory is addressed through architectural modifications or compression schemes based on periodically updated projections. We propose OASIS, an online activation subspace learning algorithm for memory-efficient training that tracks and continuously updates a low-dimensional activation subspace during training. Intermediate activations are projected onto this evolving subspace, reducing memory without modifying forward-pass computations. The evolving activation subspace induces low-rank gradient representations, enabling both gradients and optimizer states to be maintained directly in this subspace, while a projection-aware optimizer consistently transports optimizer states across subspace updates for stable training. Across various finetuning and pretraining tasks, OASIS achieves up to lower peak memory than full fine-tuning while matching its performance and outperforming prior low-rank methods.
Figures & tables
| Model | Rank | Method | Accuracy (%) | Peak Memory (GB) |
| Llama-2 7B | – | Adam | 39.37 0.39 | 95.18 |
| 32 | LoRA | 37.13 0.64 | 64.15 | |
| GaLore | 35.96 1.18 | 71.30 | ||
| LDAdam | 38.74 0.11 | 71.48 | ||
| OASIS | 39.14 0.72 | 48.21 | ||
| 128 | LoRA | 37.27 0.36 | 66.00 |
| Rank | Method | Accuracy (%) | Peak Memory (GB) |
|---|---|---|---|
| – | Adam | 34.01 1.29 | 93.26 |
| 4 | LoRA | 28.34 2.79 | 61.70 |
| GaLore | 27.42 1.22 | 69.00 | |
| LDAdam | 27.93 1.41 | 68.99 | |
| OASIS | 29.28 0.61 | 46.16 | |
| 32 | LoRA | 31.84 1.74 | 62.08 |
| Method | Llama-130M | Llama-350M | ||
|---|---|---|---|---|
| Val Loss | Mem | Val Loss | Mem | |
| Adam | 3.21 | 41.00 | 3.03 | 89.31 |
| GaLore | 3.55 | 40.73 | 3.39 | 88.22 |
| LDAdam | 3.23 | 40.73 | 2.86 | 88.22 |
| OASIS | 3.28 | 37.10 | 3.02 | 79.46 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Hyperparameter | GSM8K (Table 1 ) | HumanEval (Table 2 ) |
|---|---|---|
| Batch size | 32 | 16 |
| Sequence length | 512 | 1024 |
| Learning rate scheduler | Cosine | Cosine |
| Learning rate (LR) | ||
| Warmup steps | 5% | 5% |
| Epochs | 3 | 3 |
| Hyperparameter | Llama-130M | Llama-350M |
|---|---|---|
| Batch size | 512 | 512 |
| Sequence length | 256 | 256 |
| Training iterations | 20k | 60k |
| Learning rate (LR) | ||
| Learning rate scheduler | Cosine | Cosine |
| Warmup | 10% | 10% |
| Model | Hidden | Intermediate | Heads | Layers |
|---|---|---|---|---|
| Llama-130M | 768 | 2048 | 12 | 12 |
| Llama-350M | 1024 | 2736 | 16 | 24 |
Memory-Efficient Training
Memory-efficient training reduces the memory needed to optimize neural networks by compressing, recomputing, or relocating training state.
See all 87 papers