TL;DR
SLTrain is a new approach for pretraining Large Language Models (LLMs) that models weight matrices as a sum of low-rank and sparse components ($W = BA + S$). By using a simple, fixed-random support for the sparse component, SLTrain achieves performance comparable to full-rank training while reducing memory requirements by up to 73% for a LLaMA 7B model.
What Problem Does This Paper Address?
Training LLMs from scratch is notoriously resource-intensive. The primary bottleneck is often GPU memory, driven not just by the model weights themselves, but by the massive optimizer states (like those in Adam) required for training.
While low-rank methods like LoRA have revolutionized fine-tuning by restricting updates to a low-dimensional subspace, they generally fail at pretraining. Pretraining requires the model to learn complex, high-rank features from scratch; forcing weights into a low-rank structure during this phase severely limits the model's representational power and leads to significant performance degradation. Existing sparse training methods (like "prune-and-grow") often introduce their own overhead by requiring the storage of dense masks or full weight matrices during the search for the best sparse structure.
Methods
The authors propose SLTrain, which parameterizes weights as $W = BA + S$.
- Low-Rank ($BA$): Learned via standard matrix factorization.
- Sparse ($S$): Instead of using complex algorithms to find the "best" sparse connections, SLTrain uses a fixed, uniformly random support. A small percentage of entries (e.g., 3-5%) are chosen at the start of training, and only those specific values are learned.
To make this GPU-friendly, the authors implemented a custom linear layer. During the forward pass, the sparse values are "scatter-added" into the dense product of the low-rank factors. This avoids the computational bottlenecks typically associated with unstructured sparse tensor operations on modern hardware. Crucially, because the sparse support is fixed, the model only needs to store the indices and values of the non-zero entries, making the optimizer states scale with the number of non-zeros rather than the full matrix size.
Datasets
The researchers evaluated SLTrain using the C4 (Colossal Clean Crawled Corpus) dataset for pretraining. They tested the method across a range of LLaMA model sizes, from a tiny 60M parameter version up to the 7B parameter model. For fine-tuning evaluations, they used the standard GLUE benchmark.
Key Insights and Ideas
- The Power of "Sparse + Low-Rank": The authors provide a theoretical proposition (Proposition 1) showing that a low-rank matrix plus a sparse matrix with random support is full-rank with high probability. This effectively bypasses the expressivity bottleneck that plagues pure low-rank pretraining.
- Why Random Support Works: By analyzing pretrained models, the authors found that after removing the top singular values (the low-rank part), the residual weight magnitudes are relatively small and smoothly distributed.
This "smoothness" suggests that you don't need to be surgical about which sparse weights you pick; a random selection is sufficient to capture the necessary high-rank information.
- Synergy with Other Techniques: SLTrain is orthogonal to other memory-saving tricks. When combined with 8-bit quantization and per-layer weight updates, the memory savings become massive.
Key Results
SLTrain hits a "sweet spot" in the trade-off between perplexity (model quality), parameter count, and memory usage.
- Performance: On a LLaMA 1B model, SLTrain achieved a perplexity of 16.14, very close to the 15.56 of full-rank training, while using roughly half the trainable parameters.
- Memory Efficiency: For the LLaMA 7B model, SLTrain (combined with 8-bit Adam and per-layer updates) reduced the actual memory footprint from 67.4 GB to just 18.3 GB—a 73% reduction. This allows pretraining a 7B model on a single consumer-grade or mid-range enterprise GPU (like an A100 40GB).
- Inference: Unlike some training-only compression methods, the sparse+low-rank structure can be maintained for inference, leading to up to 35% memory savings during model deployment for larger models.
Limitations and Future Work
- Throughput Trade-off: The "scatter-add" operation for sparse weights introduces a slight computational overhead. SLTrain's throughput (tokens per second) is roughly 5-10% lower than full-rank training. The authors suggest that more optimized kernels could bridge this gap.
- Fixed vs. Dynamic Support: While random fixed support is highly memory-efficient, exploring dynamic support (changing which weights are sparse during training) might further improve performance, though likely at the cost of higher memory overhead.
- Beyond Transformers: The current work focuses on LLMs; extending this to other architectures like Vision Transformers or Diffusion models remains an open area for exploration.
Summary updated