Reducing LLM optimizer VRAM by >50% using frequency-domain gradients (cuFFT)

Hi everyone,

My team was attempting full-parameter LLM fine-tuning, but we were strictly constrained to a 5GB VRAM partition on an A100.

Because standard AdamW requires 8 bytes of state memory per parameter, we were instantly hitting OOM crashes (4GB of pure optimizer overhead for a 500M model).

To bypass this memory wall, we built an optimizer called Spectra. Instead of tracking states for every parameter, Spectra treats gradient matrices as a 2D signal during the backward pass. We use PyTorch’s native CUDA-accelerated torch.fft.fft2 to convert gradients to the frequency domain, apply a binary mask to crop out high-frequency spatial noise, and then update the weights.

By aggressively filtering this noise in the frequency domain, we completely avoid allocating 32-bit tracking states for the cropped regions. This reduced our optimizer state memory by >50%, allowing us to train comfortably inside the 5GB limit without OOM.

We just published our full empirical findings and architecture on CERN’s Zenodo: Breaking the Memory Wall: Full-Parameter LLM Fine-Tuning via Frequency-Domain Gradient Compression | Zenodo

We are curious if any NVIDIA engineers or researchers here have explored frequency-domain gradient compression as an alternative to LoRA/QLoRA for highly memory-constrained environments? Would love to hear your thoughts on the CUDA implications of this.