There is a newer version of the record available.

Published April 28, 2026 | Version 0.2.0
Software Open

SCAO: 2nd-Order Optimization Viability for Quantized LLM Fine-Tuning on Consumer Hardware

Description

This technical report and software release introduces SCAO (Sparse Curvature-Aware Adaptive Optimizer), a second-order PyTorch optimizer designed to deliver Shampoo-quality preconditioned gradients at near-AdamW memory and throughput costs. While standard full-matrix second-order methods like Shampoo exploit Kronecker-factored curvature for superior convergence, their massive memory footprint and inversion costs render them mathematically unstable and impractical for Large Language Models (LLMs) on consumer hardware.

SCAO solves this bottleneck through five core innovations: Adaptive Rank Selection (retaining ≥95% spectral mass to reduce memory by 16–32×), Sparse Block-Diagonal Preconditioning, Phase-Transition Stability guards, Int8 EMA Quantization (yielding a 4× memory reduction for curvature accumulators), and custom CUDA fused kernels.

In highly constrained environments (e.g., a single 16GB NVIDIA T4 GPU), SCAO demonstrates 100% stability during 4-bit QLoRA fine-tuning of the Qwen2.5-3B model, consuming only 7.14 GB VRAM. In direct benchmarking, standard Shampoo suffered mathematical collapse (SVD ill-conditioning) at Step 1 under identical quantized constraints. Furthermore, multi-scale benchmarks confirm SCAO outperforms the AdamW baseline in perplexity at the 5M (-9.6%) and 10M (-4.8%) parameter scales. This archive includes the full source code, benchmark suites, and reproduction scripts.

License clarification: The source code in this repository is released under the Apache License 2.0. The accompanying paper and documentation are distributed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

Files

Files (47.5 kB)

Name Size Download all
md5:cbacaef8f259aa362af5cb477b4f8ca0
47.5 kB Download

Additional details

Related works

Is supplement to
Software: https://github.com/whispering3/scao (URL)

Software

Repository URL
https://github.com/whispering3/scao
Programming language
Python , Cuda
Development Status
Active