Abstract
Large language models (LLMs) have demonstrated remarkable capabilities, yet prohibitive parameter complexity often hinders their deployment. Existing singular value decomposition (SVD) based compression methods simply deem singular values as importance scores of decomposed components. However, this importance ordered by singular values does not necessarily correlate with the performance of a downstream task. In this work, we introduce SoCo (Singular spectrum optimization for large language model Compression), a novel compression framework that learns to rescale the decomposed components of SVD in a data-driven manner. Concretely, we employ a learnable diagonal matrix to assign importance scores for singular spectrum and develop a three-stage training process that progressively refines these scores from initial coarse compression to fine-grained sparsification—thereby striking an effective balance between aggressive model compression and performance preservation. Thanks to the learnable singular spectrum, SoCo adaptively prunes components according to the sparsified importance scores, rather than relying on the fixed order of singular values. More importantly, the remaining components with amplified importance scores can compensate for the loss of the pruned ones. Experimental evaluations across multiple LLMs and benchmarks demonstrate that SoCo surpasses the state-of-the-art methods in model compression.
Introduction
Large Language Models (LLMs) are notoriously resource-hungry, making deployment on consumer hardware a massive challenge. One classic solution is Singular Value Decomposition (SVD), which breaks down massive weight matrices into smaller, low-rank components. The standard "vanilla" SVD approach is simple: keep the components with the largest singular values and toss the rest. However, the mathematical magnitude of a singular value represents its contribution to reconstructing the original matrix, not necessarily its importance to the model's actual reasoning or language ability. This mismatch leads to "catastrophic perplexity"—where the model's performance falls off a cliff—once you compress it beyond a certain point (usually around 40%).
Methods: Singular Spectrum Optimization (SoCo)
The SoCo framework moves away from rigid truncation and toward learned importance through three key innovations:
Learnable Importance Scores
Instead of just using fixed singular values ($\Sigma$), SoCo introduces a learnable diagonal matrix ($S$). The modified weight matrix becomes $W' = U(\Sigma \odot S)V^T$. This allows the model to "decide" which components are actually useful for the task at hand. Crucially, the scores in $S$ can exceed 1.0, allowing the model to amplify remaining components to compensate for information lost from pruned ones.
Three-Stage Optimization
To balance shrinking the model and maintaining performance, SoCo employs a phased training process:
- Stage 1 (Rapid Compression): Quickly drives the model toward the target compression ratio.
- Stage 2 (Alternating Optimization): Refines the importance scores by oscillating around the target ratio, allowing the model to "re-evaluate" borderline components.
- Stage 3 (Importance Sparsity): Pushes the importance scores toward a bimodal distribution (either 0 or 1), making it clear which components to prune and which to keep.
Experimental Evaluation
SoCo was evaluated across various models (LLaMA, Mistral, OPT, Vicuna) using datasets like WikiText-2 and C4.
Performance and Accuracy
SoCo consistently outperformed state-of-the-art methods like ASVD and SVD-LLM. At extreme compression ratios (e.g., 60% on LLaMA-7B), SoCo maintained a perplexity of 24.53 on the C4 dataset, while SVD-LLM's performance degraded significantly to 471.83. At 20% compression, SoCo nearly matched the original model's performance, achieving 52% average accuracy on classification tasks compared to the original's 57%.
Efficiency
The method is highly resource-efficient. For a LLaMA-7B model, SoCo only requires training 1.84M parameters (about 0.028% of the total) and takes roughly 2 hours on a single A100 GPU.
Discussion and Conclusion
The core insight of SoCo is that a component's mathematical energy does not equal its functional utility. By using a small amount of calibration data, SoCo aligns the compression process with the model's actual output quality. Unlike standard pruning, SoCo’s ability to rescale the remaining spectrum allows it to "heal" some of the damage caused by compression. While effective, SoCo currently relies on a fixed threshold (0.5) to decide which components to prune. Future work may explore adaptive thresholding strategies to automatically adjust cutoffs for different layers, potentially further improving performance in highly compressed models.
Summary updated