Introduction
As Large Language Models (LLMs) scale to hundreds of billions of parameters, their deployment is increasingly constrained by memory and compute requirements. Low-Rank Decomposition, specifically Singular Value Decomposition (SVD), offers a path to reduce model size by approximating weight matrices. However, the critical challenge of Rank Selection—determining the optimal compression level for each individual layer—remains a bottleneck. Existing methods rely on slow heuristics or gradient-based searches that often necessitate expensive post-training fine-tuning to recover lost accuracy.
The LLRC Method
To address these limitations, we introduce Learning to Low-Rank Compress (LLRC), a gradient-based framework that automatically identifies optimal compression ranks. LLRC operates by inserting a learnable masking layer into the SVD reconstruction process.
The core of LLRC consists of three technical innovations:
- Differentiable Masking: Using a Gumbel-Sigmoid trick, the selection of singular values becomes a differentiable process, allowing for standard backpropagation.
- Multi-Objective Loss: The training objective combines a distillation loss (matching original activations), a compression loss (enforcing sparsity), and a Total Variation (TV) loss to ensure stable, smooth rank selections.
- Activation-Aware SVD (ASVD): The method leverages ASVD to weight singular values based on data flow, ensuring that the most functionally important components are preserved.
Crucially, only the masks are trained while the core LLM parameters remain frozen. This "fine-tuning-free" approach significantly reduces the computational burden of model compression.
Experimental Results
LLRC was evaluated across several model families, including Llama-2, Llama-3, and Gemma, using standard benchmarks such as PIQA, BoolQ, MMLU, and NQ-Open. The masks were trained on a small subset of WikiText-2.
The results demonstrate that LLRC consistently outperforms existing rank-selection heuristics like STRS and gradient-based methods like ARS. For instance, on the MMLU benchmark, LLRC maintains higher accuracy as the parameter ratio decreases compared to baseline methods. Notably, LLRC even competes with methods that utilize full-model fine-tuning, despite keeping its own weights frozen. In specific tests with Llama-2-13B at 20% compression, LLRC outperformed the STRS heuristic by a massive 12% on MMLU and showed significant gains on BoolQ and OpenbookQA.
Key Insights
Our analysis revealed several important properties of LLM compression:
- "Any-k" Selection: Allowing the mask to select any combination of singular values, rather than just the top-k largest, yields better performance. This suggests that smaller singular values can capture critical task-specific information.
- Layer Sensitivity: Optimization shows that earlier layers and key/query projections are more compressible, while feedforward up/down projections are highly sensitive and require higher ranks.
- The Role of Smoothness: The introduction of the Total Variation (TV) loss was essential for preventing "jittery" masks that skip singular values, which otherwise degrades internal representations.
Conclusion and Future Work
LLRC provides a robust, efficient solution for LLM compression by automating rank selection through differentiable optimization. While the current implementation requires full-rank SVD during the mask training phase—increasing temporary memory overhead—it offers a superior accuracy-to-compression trade-off without the need for costly fine-tuning. Future research will explore combining LLRC with other decomposition techniques to further push the boundaries of model efficiency.
Summary updated