NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

FlashOptim: Optimizers for Memory-Efficient Training

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

The Memory Wall Problem

Training modern neural networks is heavily bottlenecked by accelerator memory. When training a model, memory is consumed not just by the model's weights, but also by gradients and optimizer states (such as momentum and variance). In standard mixed-precision training, these auxiliary tensors take up the lion's share of available memory.

For example, training a 7-billion parameter model using the popular AdamW optimizer typically requires 16 bytes per parameter. This translates to roughly 112 GiB of accelerator memory—well beyond the 80 GiB capacity of a single high-end NVIDIA H100 GPU. While workarounds like ZeRO sharding or CPU offloading exist, they often require complex setups or multiple GPUs.

FlashOptim tackles this bottleneck at the source. It introduces a suite of drop-in optimizers that slashes the memory footprint of training by over 50% without sacrificing model quality or API compatibility.

Under the Hood: Two Key Innovations

FlashOptim reduces the memory requirement of AdamW from 16 bytes per parameter to just 7 bytes (or 5 bytes with gradient release) through two primary mechanisms:

1. ULP-Based Weight Splitting

Standard training maintains "master weights" in 32-bit floating-point (FP32) to preserve precision. FlashOptim instead stores a low-precision weight (BF16) alongside a tiny 8-bit correction term.

The authors identified that the error between a BF16 value and its FP32 original is bounded by the "Unit in the Last Place" (ULP). Because exponent bits are largely redundant when storing this difference, FlashOptim scales the error relative to the low-precision value's ULP. This packs more meaningful bits into the same space, achieving approximately 24-bit effective precision using only 3 bytes total.

2. Companded Optimizer State Quantization

Simply applying linear quantization to compress optimizer states into 8 bits typically causes training to diverge due to non-uniform distributions. FlashOptim solves this using companding—a technique borrowed from signal processing.

By applying non-linear functions (e.g., softsign for momentum and square root for variance) to reshape the distribution before quantization, the 8-bit bins are utilized highly efficiently. This preserves the critical signals necessary for stable, production-grade convergence.

Implementation and Compatibility

FlashOptim is designed as a drop-in replacement for standard optimizers like AdamW, SGD, and Lion. Because it doesn't alter the fundamental math of the optimizer, it is perfectly orthogonal to other memory-saving techniques like activation checkpointing or Fully Sharded Data Parallel (FSDP).

To ensure these compression and decompression steps do not bottleneck training speed, the operations are implemented as fused kernels using OpenAI’s Triton language. This keeps the logic on-chip and avoids expensive memory transfers.

Results and Benchmarks

The authors validated FlashOptim across a rigorous suite of vision and language benchmarks, including ResNet-50 on ImageNet-1K, GPT-2 and 1.7B LLaMA-style pretraining on FineWeb10B, and Llama-3.1-8B finetuning on OpenMathInstruct-2.

  • Massive Memory Savings: During Llama-3.1-8B finetuning, FlashOptim reduced peak memory usage from 175 GiB to 113 GiB.
  • Zero Quality Loss: Across all tests—from image classification accuracy to LLM loss curves and downstream in-context learning tasks (GSM8k, HellaSwag, ARC-Easy, PIQA)—FlashOptim matched the performance of standard FP32 master-weight optimizers.
  • Checkpoint Efficiency: Because weights and states remain compressed, model checkpoint sizes are drastically reduced. For example, an 84 GiB AdamW checkpoint shrank to just 35 GiB.
  • Maintained Throughput: Thanks to the fused Triton kernels, training throughput remained on par with optimized standard implementations.

Limitations

While highly effective, FlashOptim's benefits are most pronounced in parameter-heavy models. For models dominated by large activations (such as high-resolution CNNs), the overall memory savings will be more modest.

Additionally, parameters with highly sparse updates (like rarely accessed embedding rows) might theoretically be more sensitive to quantization, though this was not observed in the benchmarks. Finally, while 24-bit effective precision proved sufficient for all tested models, extreme training scenarios with aggressive learning rate annealing might still necessitate full 32-bit precision.

FlashOptim is available as an open-source PyTorch library at github.com/databricks/flashoptim.

Summary updated

BibTeX
@inproceedings{ortiz2026flashoptim,
  author = {Jose Javier Gonzalez Ortiz and Abhay Gupta and Christopher Rinard and Davis Blalock},
  title = {{FlashOptim: Optimizers for Memory-Efficient Training}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Wfe1iJocjF},
}
Figure