Swift-SVD: Theoretical Optimality Meets Practical Efficiency in Low-Rank LLM Compression
Organizations: Institute of Artificial Intelligence (TeleAI), China Telecom · Shanghai Jiao Tong University · University of Maryland · University at Buffalo ·
Abstract
The deployment of Large Language Models is constrained by the memory and bandwidth demands of static weights and dynamic Key-Value cache. SVD-based compression provides a hardware-friendly solution to reduce these costs. However, existing methods suffer from two key limitations: some are suboptimal in reconstruction error, while others are theoretically optimal but practically inefficient. In this paper, we propose Swift-SVD, an activation-aware, closed-form compression framework that simultaneously guarantees theoretical optimum, practical efficiency and numerical stability. Swift-SVD incrementally aggregates covariance of output activations given a batch of inputs and performs a single eigenvalue decomposition after aggregation, enabling training-free, fast, and optimal layer-wise low-rank approximation. We employ effective rank to analyze local layer-wise compressibility and design a dynamic rank allocation strategy that jointly accounts for local reconstruction loss and end-to-end layer importance. Extensive experiments across six LLMs and eight datasets demonstrate that Swift-SVD outperforms state-of-the-art baselines, achieving optimal compression accuracy while delivering 3-70X speedups in end-to-end compression time. Our code is available at https://github.com/hiahei/Swift-SVD.
Figures & tables
| Ratio (MEM.) | Method | PPL ( ) | Accuracy ( ) | |||||||
| WikiText-2 | C4 | ARC_e | PIQA | Openb. | WinoG. | HellaS. | MathQA | Avg. | ||
| 1.0(12.6GB) | Baseline | 5.68 | 7.34 | 0.76 | 0.79 | 0.34 | 0.70 | 0.57 | 0.27 | 0.57 |
| 0.8 (10.1 GB) | FWSVD | 1727 | 1511 | 0.11 | 0.10 | 0.09 | 0.05 | 0.08 | 0.05 | 0.08 |
| ASVD | 11.14 | 15.93 | 0.53 | 0.68 | 0.29 | 0.64 | 0.41 | 0.17 | 0.45 | |
| SVD-LLM(W) | 7.94 | 15.84 | 0.62 | 0.71 | 0.31 | 0.61 | 0.45 | 0.21 | 0.49 | |
| Dobi-SVD(w/o) | 8.87 | 10.91 | - | - | - | - | - | - | - | |
| Model | OPT-6.7B | LLAMA 2-7B | MISTRAL-7B | ||||||
| Method | Perplexity | Acc | Perplexity | Acc | Perplexity | Acc | |||
| Wiki2 | C4 | Avg. | Wiki2 | C4 | Avg. | Wiki2 | C4 | Avg. | |
| Original | 10.86 | 12.52 | 0.52 | 5.47 | 9.30 | 0.57 | 5.25 | 9.28 | 0.61 |
| ASVD | 82.04 | 102 | 0.32 | 10.10 | 24.02 | 0.36 | 13.72 | 23.34 | 0.32 |
| SVD-LLM (W) | 16.04 | 21.27 | 0.41 | 8.50 | 12.69 | 0.53 | 10.21 | 13.17 | 0.42 |
| Swift-SVD | 12.12 | 17.93 | 0.50 | 8.41 | 12.54 | 0.56 | 7.40 | 12.80 | 0.54 |
| nsamples = 256 | nsamples = 2048 | ||||||
| Ratio | Datasets | Original | PPL | Ratio | Datasets | Original | PPL |
| 0.8 | C4 | 11.42 | 11.42 | 0.8 | C4 | 11.34 | 11.34 |
| WikiText 2 | 7.86 | 11.33 | WikiText 2 | 7.81 | 11.31 | ||
| Alpaca | 8.49 | 10.51 | Alpaca | 7.84 | 10.38 | ||
| 0.6 | C4 | 23.17 | 23.17 | 0.6 | C4 | 22.37 | 22.37 |
| WikiText 2 | 13.42 | 37.00 | WikiText 2 | 13.37 | 35.02 | ||
| Samples | Method | Total (s) | Speedup | |||
| 16 | Dobi-SVD(w/o) | 960 | 650 | 373 | 1,983 | |
| SVD-LLM (W) | 542 | 489 | 503 | 1,534 | ||
| Swift-SVD | 342 | 146 | 133 | 621 | 3.2 | |
| 64 | Dobi-SVD(w/o) | 3,823 | 2,551 | 1,508 | 7,882 | |
| SVD-LLM (W) | 555 | 530 | 565 | 1,650 | ||
| Swift-SVD | 346 | 158 | 150 | 654 | 12.1 |
| Input Weight | ||
| Minimum | 126.2506 | 841.1812 |
| SVD-LLM | 126.7102 (+0.4596) | 854.4129 (+13.2317) |
| Dobi-SVD | 128.5441 (+2.2935) | 874.7711 (+33.5899) |
| Swift-SVD | 126.2506 (+0.0000) | 841.1812 (+0.0000) |
| Input Weight | ||
| Minimum | 1657.4801 | 3308.6428 |
| Strategy | LLaMA-7B | LLaMA-2-7B | OPT-6.7B | Mistral-7B |
| Swift-SVD | 11.42 | 12.54 | 17.93 | 12.80 |
| Swift-SVD(C) | 16.04 | 22.16 | 20.69 | 22.87 |
| Swift-SVD(I) | 14.88 | 17.30 | 18.94 | 22.50 |
| Swift-SVD † (C) | 11.78 | 13.74 | 15.66 | 11.67 |
| Swift-SVD † (I) | 11.73 | 13.27 | 14.74 | 11.48 |
| Swift-SVD* | 11.15 | 12.35 | 13.68 | 11.08 |
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Ratio | Aware | ARC_e | ARC_c | PIQA | Openb. | WinoG. | mathQA | HellaS. | Avg |
| Llama-7B | Original | Object | 0.76 | 0.42 | 0.79 | 0.34 | 0.70 | 0.27 | 0.67 | 0.56 |
| 0.8 | C4 | 0.64 | 0.33 | 0.73 | 0.26 | 0.67 | 0.23 | 0.47 | 0.48 | |
| All | 0.70 | 0.38 | 0.76 | 0.29 | 0.68 | 0.26 | 0.49 | 0.51 | ||
| Each | 0.71 | 0.38 | 0.76 | 0.30 | 0.68 | 0.26 | 0.49 | 0.51 | ||
| 0.6 | C4 | 0.49 | 0.25 | 0.66 | 0.21 | 0.62 | 0.22 | 0.37 | 0.40 | |
| All | 0.61 | 0.31 | 0.72 | 0.25 | 0.62 | 0.25 | 0.40 | 0.45 |
| Ratio | Method | PPL | Accuracy | ||||||||
| Wiki | C4 | ARC-e | ARC-c | PIQA | Openb. | WinoG. | MathQA | HellaS. | Avg | ||
| 1.0 | Original | 5.68 | 7.34 | 0.76 | 0.38 | 0.79 | 0.34 | 0.70 | 0.27 | 0.51 | 0.64 |
| 0.8 | Basis Sharing | 7.74 | 15.03 | 0.66 | 0.36 | 0.71 | 0.28 | 0.66 | 0.25 | 0.46 | 0.56 |
| Swift-SVD | 7.71 | 11.27 | 0.67 | 0.35 | 0.73 | 0.28 | 0.68 | 0.24 | 0.47 | 0.57 | |
| 0.6 | Basis Sharing | 12.39 | 41.28 | 0.52 | 0.27 | 0.62 | 0.22 | 0.61 | 0.23 | 0.35 | 0.47 |
| Swift-SVD | 12.69 | 22.10 | 0.53 | 0.25 | 0.63 | 0.23 | 0.63 | 0.23 | 0.36 | 0.48 | |
| Ratio | Method | ARC-e | PIQA | Openb. | WinoG. | HellaS. | MathQA | Avg |
| 1.0 | Original | 0.81 | 0.75 | 0.30 | 0.66 | 0.52 | 0.40 | 0.57 |
| 0.8 | SVD-LLM(W) | 0.64 | 0.62 | 0.24 | 0.57 | 0.40 | 0.27 | 0.46 |
| Dobi-SVD(w/o) | 0.62 | 0.61 | 0.23 | 0.55 | 0.39 | 0.26 | 0.44 | |
| Dobi-SVD(w) | 0.31 | 0.60 | 0.19 | 0.55 | 0.30 | 0.21 | 0.36 | |
| Swift-SVD | 0.69 | 0.70 | 0.26 | 0.61 | 0.42 | 0.29 | 0.50 | |
| Swift-SVD(C) | 0.69 | 0.69 | 0.26 | 0.60 | 0.41 | 0.27 | 0.49 |
| Ratio | Method | PPL | Accuracy | ||||||||
| Wiki | C4 | ARC-e | ARC-c | PIQA | Openb. | WinoG. | MathQA | HellaS. | Avg | ||
| 1.0 | Original | 7.60 | 12.40 | 0.25 | 0.23 | 0.50 | 0.36 | 0.73 | 0.21 | 0.64 | 0.42 |
| 0.8 | Naive SVD | — | — | 0.27 | 0.23 | 0.60 | 0.21 | 0.51 | 0.21 | 0.30 | 0.33 |
| Swift-SVD | 9.38 | 15.45 | 0.79 | 0.49 | 0.78 | 0.36 | 0.73 | 0.43 | 0.58 | 0.59 | |
| 0.6 | Naive SVD | — | — | 0.25 | 0.22 | 0.55 | 0.16 | 0.50 | 0.19 | 0.26 | 0.30 |
| Swift-SVD | 12.59 | 22.99 | 0.73 | 0.42 | 0.74 | 0.29 | 0.72 | 0.30 | 0.49 | 0.53 | |
| Uniform Compression | Dynamic Compression | |||||
| Ratio | Swift-SVD | SVD-LLM(W) | Dobi-SVD(w/o) | Swift-SVD* | Swift-SVD(C) | Dobi-SVD(w) |
| 0.8 | 192.9 | 192.7 | 193.3 | 193.7 | 191.4 | 104.4 |
| 0.6 | 209.2 | 208.1 | 207.8 | 207.3 | 206.3 | 117.5 |
| 0.4 | 216.8 | 216.5 | 216.8 | 216.0 | 215.4 | 131.6 |
| Ratio | Uniform rank | q_proj | k_proj | v_proj | o_proj | gate_proj | up_proj | down_proj | Throughput |
| 0.8 | 1638 | 1627 | 1661 | 1743 | 1588 | 2365 | 2379 | 2385 | 101.3 |
| 0.6 | 1229 | 1213 | 1230 | 1294 | 1189 | 1773 | 1781 | 1812 | 113.4 |
| 0.4 | 819 | 794 | 775 | 839 | 773 | 1207 | 1206 | 1227 | 130.8 |
| Length 1024 | Length 8192 | |||
| Ratio | Throughput | Gain | Throughput | Gain |
| 1.0 | 438.86 | — | 140.39 | — |
| 0.8 | 457.31 | 4% | 144.98 | 3% |
| 0.6 | 473.38 | 8% | 169.17 | 20% |
| 0.4 | 497.29 | 12% | 181.23 | 29% |
| 0.2 | 551.04 | 26% | 187.45 | 34% |
| RATIO | WikiText-2 | C4 |
| Original | What color is the sky on a clear day? On a clear day, the sky appears blue due to the way sunlight scatters through the atmosphere, a phenomenon known as Rayleigh scattering. | |
| 0.8 | What color is the sky on a clear day? Blue, green or white. The answer to this question should be blue. Because of the atmosphere and sunlight, it’s blue. However some people might think that it’s green because they are looking at trees in front of the sky. Others may say that it’s white due to clouds. But actually it’s blue. The same way as with other colors like red or yellow, the color of the sky can change depending on weather conditions. | What color is the sky on a clear day? The sky is blue on a clear day. The sky appears blue because sunlight is scattered by the atmosphere. |
| 0.6 | What color is the sky on a clear day? Blue or white. () in what colors are to be used for the sky. The sun and moon have their own light, but it’s not that they can change into red or green, which appears as dark clouds when we observe them from high altitude. In this case of being able to see all skies, these colors would be so different with such great brightness. For example , you could imagine that some people might find something similar to the sky’s color. I think perhaps the sky is blue." | What color is the sky on a clear day? The answer is blue. But this question might be confusing because it’s not possible to see what colors are in the atmosphere when you look at it from Earth. So I need to find out what happens if there’s no clouds, and then how much light would reflect into the atmosphere? If we have some cloud cover over the earth and only sunlight comes through, that could make an effect of reflection by something like reflected sunlight or light being absorbed. |
| 0.4 | What color is the sky on a clear day? It has blue colors. The sky’s white coloring in black, with yellow hues of purple that are gray. It s colored as red, and its colors have green tones which are dark. This landscape area is brown to some areas where they are not covered by the natural vegetation but they contain many small plants such trees and other species like plant wood. With these trees having a forest structure from their tree and being surrounded by various species including woodland. | What color is the sky on a clear day? Options: - A) white, b ) green , c ) blue , d ) yellow. The answer will be blue. |
| Original | What is the responsibility of the AI assistant? The responsibility of an AI assistant primarily lies in providing accurate, helpful, and ethical assistance to users. This includes adhering to guidelines, maintaining privacy, avoiding harmful or biased content, and ensuring that the information provided is reliable and up-to-date. Additionally, AI assistants should respect user autonomy, offer transparency about their capabilities and limitations, and avoid any form of deception or manipulation. | |
| 0.8 | What is the responsibility of the AI assistant? First, to ensure that its responses are accurate and reliable, in accordance with human standards. The second task of AI assistants is to be a helpful companion for humans. This means they can help people by providing information about their own lives, or helping them solve problems. In addition, AI assistance can serve as an aid to enhance intelligence through learning from data collected by other AI systems. And finally, AI assistants may also have responsibilities related to ethical issues such as privacy protection. | What is the responsibility of the AI assistant? The AI assistant is responsible for providing accurate information and helping users with their questions. |
LLM Compression
Large language model compression reduces the memory, compute, and context costs of LLMs while aiming to preserve their capabilities.
See all 273 papers