Compressing Large Language Models using Low Rank and Low Precision Decomposition

The prohibitive sizes of Large Language Models (LLMs) today make it difficult to deploy them on memory-constrained edge devices. This work introduces $\rm CALDERA$ -- a new post-training LLM compression algorithm that harnesses the inherent low-rank structure of a weight matrix $\mathbf{W}$ by approximating it via a low-rank, low-precision decomposition as $\mathbf{W} \approx \mathbf{Q} + \mathbf{L}\mathbf{R}$. Here, $\mathbf{L}$ and $\mathbf{R}$ are low rank factors, and the entries of $\mathbf{Q}$, $\mathbf{L}$ and $\mathbf{R}$ are quantized. The model is compressed by substituting each layer with its $\mathbf{Q} + \mathbf{L}\mathbf{R}$ decomposition, and the zero-shot performance of the compressed model is evaluated. Additionally, $\mathbf{L}$ and $\mathbf{R}$ are readily amenable to low-rank adaptation, consequently enhancing the zero-shot performance. $\rm CALDERA$ obtains this decomposition by formulating it as an optimization problem $\min_{\mathbf{Q},\mathbf{L},\mathbf{R}}\lVert(\mathbf{Q} + \mathbf{L}\mathbf{R} - \mathbf{W})\mathbf{X}^\top\rVert_{\rm F}^2$, where $\mathbf{X}$ is the calibration data, and $\mathbf{Q}, \mathbf{L}, \mathbf{R}$ are constrained to be representable using low-precision formats. Theoretical upper bounds on the approximation error of $\rm CALDERA$ are established using a rank-constrained regression framework, and the tradeoff between compression ratio and model performance is studied by analyzing the impact of target rank and quantization bit budget. Results illustrate that compressing LlaMa-$2$ $7$B/$13B$/$70$B and LlaMa-$3$ $8$B models using $\rm CALDERA$ outperforms existing post-training LLM compression techniques in the regime of less than $2.5$ bits per parameter. The implementation is available at: https://github.com/pilancilab/caldera.

Paper

Similar papers

Peer review

Reviewer 23tr7/10 · confidence 3/52024-06-21

Summary

This paper proposes a framework that combines quantization and low-rank approximation. Given a neural net weight matrix $W\in \mathbb{R}^{n\times d}$, it considers the following decomposition: $W=Q+LR$, where $Q$ is a quantized sketch of $W$ with very few bits (2 or 4 in their experiments), and $L\in \mathbb{R}^{n\times k}, R\in \mathbb{R}^{k\times d}$ are low-rank factors that serve as a "correction" to the quantization sketch $Q$. They are usually quantized with more bits (4 or 16). To compute respective $Q, L, R$, the authors propose an alternating minimization framework: starts with $L, R=0$, update $Q$ as $Q_t=Q_Q(W-L_{t-1}R_{t-1})$, then solve for $L_t, R_t$ by solving the rank-constrained regression against $W-Q_t$ and $X\in \mathbb{R}^{m\times d}$, where $X$ is the calibration dataset. They further show their algorithm could be used in conjunction with LoRA and fine-tuning the randomized Hadamard transform. Extensive experiments show that their proposed algorithm gives low perplexities and high accuracies when compared against earlier algorithms.

Strengths

This paper proposes a method that is a good mixture of quantization and low-rank approximation, as simply using only one of quantization sketch or low-rank approximation intuitively "misses" an important part. The algorithm proposed in this paper is a natural and simple alternating minimization framework. This paper also contains a theoretical analysis for approximation error under assumptions on the target rank. Empirically, it is also shown the proposed algorithm has good performance under small rank and bit precision. The paper is also well-written.

Weaknesses

Overall, I don't see big weaknesses of this paper. One potential direction for improvement is theoretically, the alternating minimization framework could possibly be sped up given $k\ll n, d$, especially the rank-constrained regression, see [1]. On the other hand, it is not clear how to integrate these possible algorithmic pieces into post-processing a model weight, so I think the approach and runtime analysis of this paper are fair. [1] Gu, Song, Yin and Zhang. Low Rank Matrix Completion via Robust Alternating Minimization in Nearly Linear Time. ICLR'24.

Questions

If we allow $L$ and $R$ to be computed to full bit-precision, could the statement / result of Theorem 4.1 be simplified?

Rating

7

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

Yes.

Reviewer GVVM7/10 · confidence 2/52024-07-03

Summary

This paper introduces CALDERA, a new post-training compression algorithm for large language models (LLMs). CALDERA uses the inherent low-rank structure of LLM weight matrices by approximating them via a low-rank, low-precision decomposition $W \approx Q + LR$, where $L$ and $R$ are low-rank factors with quantized entries. CALDERA provides an effective way to compress large language models by exploiting their low-rank structure, enabling efficient distribution and deployment of LLMs on resource-constrained hardware while maintaining strong performance.

Strengths

1. CALDERA introduces a new post-training compression technique for LLMs that exploits their inherent low-rank structure, setting it apart from existing methods. Also, the paper provides theoretical upper bounds on the approximation error of CALDERA using a rank-constrained regression framework, lending credibility to the approach. 2. Experimental results demonstrate that CALDERA outperforms existing post-training LLM compression techniques in the low-bit regime (less than 2.5 bits per parameter), highlighting its effectiveness. By enabling efficient distribution and deployment of LLMs on resource-constrained hardware, CALDERA can make LLMs more accessible and promote their broader adoption.

Weaknesses

This paper is generally well-written. Here are some minor weaknesses: 1. The performance of CALDERA depends on the choice of target rank and quantization bit budget. The paper does not provide a systematic way to determine the optimal values for these hyperparameters. Is it possible to apply meta-learning here to decide the optimal values? 2. The experiments focus on compressing LLaMa models. It would be valuable to see how CALDERA performs on a wider range of LLMs to assess its generalizability. 3. As mentioned by the authors, the iterative nature of CALDERA's optimization process may require more computational resources compared to simpler compression methods, although this is a one-time cost.

Questions

How does CALDERA perform compared to other compression approaches? Is it possible to combine CALDERA with these techniques?

Rating

7

Confidence

2

Soundness

4

Presentation

3

Contribution

3

Limitations

Please see weaknesses.

Reviewer 32tN2/10 · confidence 5/52024-07-12

Summary

This paper introduces CALDERA, a novel post-training method that combines quantization and low-rank decomposition techniques for compressing large language models. The primary contribution lies in the design of a combined pipeline and the application of low-rank decomposition. Experimental results demonstrate that integrating the designed low-rank decomposition technique enhances compression performance compared to using quantization alone.

Strengths

1. This paper addresses a highly significant and widely studied research topic: compressing large language models. 2. The author not only conducts experiments but also provides numerical evidence to demonstrate the effectiveness of the designed compression method. 3. Experimental results indicate that the combined methods designed in this study effectively enhance the performance of large language models compressed using quantization-only methods.

Weaknesses

1. **Missing Experimental Results:** The experiments conducted in this paper are inadequate. Many critical experiments conducted in previous works have not been included. For instance: - Evaluation of throughput for LLaMA models compressed by CALDERA and QuIP# under the same average bits with the same batch size and sequence length. It's crucial to assess whether combining low-rank decomposition with quantization compromises efficiency compared to uncompressed LLMs. - Evaluation results on LLMs with different architectures from LLaMA and on generation datasets. - Evaluation of time consumption between CALDERA and QuIP# for compressing LLMs. - Evaluation of compression performance using different calibration sets and varying numbers of calibration data. 2. **Lack of Novelty:** The novelty of this paper is limited. The primary contributions are the design of a combination framework and a low-rank decomposition algorithm, both of which appear simplistic and resemble iterative weight compression methods with minor losses. The use of the existing quantization method LDLQ for combination and the effectiveness of the designed low-rank decomposition method in achieving minimal compression loss are questionable. Replacing it with established work like data whitening method in SVD-LLM[1] might yield better performance, given SVD-LLM's theoretical proof of achieving global optimality through data whitening. *[1] Wang, X., Zheng, Y., Wan, Z., & Zhang, M. (2024). SVD-LLM: Truncation-aware Singular Value Decomposition for Large Language Model Compression. https://arxiv.org/abs/2403.07378* 3. **Intuitive Experimental Results:** While it's intuitive that combining low-rank decomposition with quantization can improve performance over quantization-only methods, existing works such as SVD-LLM already demonstrate this. To add value to the proposed methods, it's crucial to include experimental results where the average bits are equal to or less than 1-bit, demonstrating capabilities that quantization-only methods cannot achieve.

Questions

See above.

Rating

2

Confidence

5

Soundness

3

Presentation

1

Contribution

1

Limitations

N.A.

Reviewer 32tN2024-08-10

More concerns

Thank the authors for the detailed response and clarification. After reading the global response given by the authors. I have two more concerns. 1. **The compression time cost of CALDERA is much higher than QuIP#.** In Appendix F.7 of QuIP#'s paper, the authors claim that "All experiments were run on NVIDIA A100 GPUs ... We find that we can quantize Llama2 70B without fine-tuning in under 10 GPU-hours and with fine-tuning in around 100 GPU-hours." Therefore, the comparison of time costs in the global response is **NOT fair**. Based on the GPU hours for running CALDERA and QuIP#, I made the following table. The time cost of CALDERA without fine-tuning is already higher than QuIP# with fine-tuning. However, the perplexity (PPL) of the LLM compressed by CALDERA without fine-tuning is not as good as that compressed by QuIP# with fine-tuning, as reported in [1]. Therefore, given the same compute budget for compression, CALDERA is **less competitive** than QuIP#. Also, since QuIP# requires less time than CALDERA for compression, the explanation in the footnote of page 8 in the submission for using the LLM compressed by QuIP# but **WITHOUT** being fully fine-tuned is **NOT convincing**, and the all results reported in Section 5.2 are also **NOT convincing**. Therefore, it is still **questionable** whether the designed algorithm CALDERA is better than the baseline method QuIP#. | | w/o Fine-tuning | w/ fine-tuning | |---------|-------------------|--------------------| | CALDERA | 90 H100 GPU-hours | Unknown | | QuIP# | 10 A100 GPU-hours | 100 A100 GPU-hours | 2. **The reported generation throughput is poor.** In Table 1 shown in the global response, the throughput of LLM compressed by CALDERA with its best configuration (Rank=256, $B_L = B_R = 4$) is 45 tok/sec, which is much worse than that of QuIP#, which is 76 tok/sec. Therefore, if throughput is the primary target, CALDERA is still **less competitive** than QuIP#. Based on the concerns above, I have decided to temporarily adjust my score to reject and I hope more clarifications on these two concerns. Thank you. [1] Albert Tseng et al., QuIP#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebooks. ICML, 2024

Reviewer 32tN2024-08-13

Abnormal Results in Table 5

When comparing the accuracy of uncompressed LLaMA 2-7B and LLaMA 2-70B in Table 1 in the submission with LLaMA 2-7B compressed by CALDERA with LoRA fine-tuning in Table 5, I found that the accuracy of compressed LLaMA 2-7B is much higher than that of the uncompressed LLaMA 2-7B and even uncompressed LLaMA 2-70B, as shown below. | | Bits | Wino | RTE | |------------------------------------------|------|-------|-------| | Uncompressed LLaMA 2-7B | 16 | 67.3 | 63.2 | | Uncompressed LLaMA 2-70B | 16 | 77.0 | 67.9 | | LLaMA 2-7B compressed by CALDERA with FT | 2.4 | 84.93 | 86.28 | This is **abnormal**, as the compressed LLM shows a significant improvement in accuracy despite an extensive compression ratio (the weight memory of LLaMA 2-70B 16bit is about 80 times larger than that of LLaMA 2-7B 2bit). The reasonable explanations I can think of are either the failure to use the optimal parameter configuration during inference, or the overfitting of the fine-tuned LLM on these three datasets. Therefore, the results in table 5 are **NOT convincing**.

Authorsrebuttal2024-08-13

Response to more concerns and abnormal results

Dear Reviewer 32tN, we believe you have made two major misunderstandings. Please allow us to clarify them. Firstly, we believe there has been a misunderstanding as to what is referred to as fine-tuning in our paper. In LoRA fine-tuning, the model is adapted or fine-tuned using a **smaller, task-specific dataset**. Please note that Randomized Hadamard Transform fine-tuning (RHT-FT) and LoRA fine-tuning are two separate components, and independent of each other. RHT-FT is a step of the quantization process in QuIP# -- it is done on the calibration set, and is meant to decrease the PPL (or increase the accuracy) across all tasks generally. In contrast, LoRA fine-tuning is task-specific, and is done on a *specific dataset* like Wino or RTE. For instance, an accuracy of 84.93\% for Wino and 86.28\% for RTE, is a consequence of fine-tuning the LLM using LoRA on Wino and RTE, respectively. The uncompressed models have **NOT** been fine-tuned to these task specific datasets, which is why CALDERA + Fine-tuning performs better than the uncompressed model. This is very natural to expect as a consequence of fine-tuning, and not abnormal at all. It is observed in other prior works as well -- for example, see Fig. 2 of LQ-LoRA [1]. Hence, it is **not a fair comparison** to compare *CALDERA-quantized models fine-tuned for a specific downstream task* with *non fine-tuned uncompressed models*. [1] Guo et. al, LQ-LoRA: Low-rank Plus Quantized Matrix Decomposition for Efficient Language Model Finetuning, ICLR 2024. Secondly, we believe there has been a misunderstanding on your end regarding performance of our compressed models and prior works like QuIP#. We agree that if the metric of performance is purely quantization time or generation throughput, QuIP# achieves higher performance *with respect to those metrics*. However, that has never been the primary thesis of our work, i.e., we do not claim that compressing LLMs with CALDERA is faster than QuIP#. A central thesis of our work is that CALDERA **does** perform better than QuIP\# in the sense that that it consistently achieves lower perplexities than QuIP# -- when comparing *QuIP# without RHT-FT to CALDERA without RHT-FT*, or *QuIP# with RHT-FT to CALDERA with RHT-FT*. As RHT-FT is an optimization that applies to both QuIP# and CALDERA, it is unfair to compare accuracies and PPLs achieved by QuIP# with RHT-FT to CALDERA without RHT-FT. For a fair comparison, please refer to Table 3 where we have compared CALDERA with RHT-FT and QuIP# with RHT-FT, for 7B models. It is evident from Table 5 that CALDERA consistently has lower PPL than QuIP#. Furthermore, if you look at Table 4 of QuIP#, they report PPLs of 6.19 (Wiki) and 8.16 (C4), which are still higher than 5.84 (Wiki) and 7.75 (C4) (highlighted numbers on Table 5). We have not done RHT-FT on the 70B model because of limited rebuttal duration. But our original submission **does report** extensive comparisons with RHT-FT for 7B models. Doing such extensive comparisons with the 70B model within the rebuttal window is infeasible. We report wallclock time for quantization, just to show that it *not prohibitively high* when compared to QuIP#. Additionally, doing RHT-FT on the CALDERA quantized 70B would take the same amount of time as the RHT-FT step in QuIP# does, which is once again, *not prohibitively slow*, given this is a one-time cost. Regarding throughput, our global response simply shows that it is not degraded much compared to QuIP# due to the low-rank component. It should be noted that it is still significantly higher than the unquantized model (even without custom CUDA kernels for the low-rank component). We reiterate that our work is motivated with closing the gap with respect to uncompressed models in the 2 to 2.5 bits per parameter regime. And, it is clear that we are able to get lower perplexities than QuIP# when the comparison is fair, i.e., either with or without RHT-FT in both cases.

Reviewer 32tN2024-08-14

Keep my rating

Thanks for the authors' response. However, the response does not address my concerns: 1. **The author is confusing the fine-tuning of LLMs with the fine-tuning of BERT.** LLMs are designed to handle a wide range of tasks, including text generation, translation, summarization, and more. Fine-tuning an LLM often involves adapting the model to perform well on diverse tasks rather than focusing on a single, narrowly defined task like classification. In contrast, BERT is often fine-tuned for specific tasks such as classification, question answering, and named entity recognition. I highly recommend that the authors add evaluations on several generation tasks. As mentioned before, I deeply suspect that the LLM is overfitting on fine-tuned classification datasets such as RTE and will show much poorer generation ability. 2. **The author does not follow the literature to fine-tune the LLM.** To the best of our knowledge, none of the existing LLM compression works fine-tune their compressed LLM on classification datasets. Common datasets for fine-tuning include language modeling datasets such as WikiText-2 and C4, or instruction tuning datasets such as Alpaca. The paper [1] mentioned by the authors in their response also follows this trend. For instance, the authors fine-tune RoBERTa-Large on classification datasets but fine-tune models like LLaMA-2 on C4 and OpenAssistant datasets. We recommend the authors follow the literature to design the LoRA fine-tuning experiments. 3. **The author does not address the poor time cost for compression and the poor throughput for inference.** Even though CALDERA achieves slightly better PPL than QuIP#, its poor time cost for compression and inferior throughput for inference make it less attractive. For example, when the goal is to compress the LLM to reduce its inference latency on a server where memory is not the main concern, CALDERA is even less appealing than some 3-bit quantization algorithms, as these algorithms guarantee lower latency and similar or even better accuracy. 4. **The author should use the default configuration to fully RHT-FT QuIP# and update the evaluation results on Table 3 and Table 4.** It is insufficient to only use PPL to compare the accuracy of the compressed LLMs, especially when the PPL values from two compressed LLMs are so close. The authors should update the evaluation results of LLMs compressed by QuIP# with fully RHT-FT in both Table 3 and Table 4 in the submission. Therefore, I would still like to keep my rating.

Reviewer xRtR4/10 · confidence 2/52024-07-13

Summary

The article introduces CALDERA, a post-training compression algorithm for large language models (LLMs) that leverages the low-rank structure of weight matrices to achieve significant compression. CALDERA approximates a weight matrix $W$ using a low-rank, low-precision decomposition $W \approx Q + LR$, where $Q$, $L$ and $R$ are quantized. The method aims to reduce the memory and computational footprint of LLMs, facilitating their deployment on memory-constrained edge devices.

Strengths

Innovative Compression Technique: CALDERA combines low-rank approximation with low-precision quantization, addressing both the redundancy and precision issues in LLM weight matrices. Theoretical Foundations: The algorithm is backed by rigorous theoretical guarantees on the approximation error, which enhances its reliability. Performance: Empirical results show that CALDERA outperforms existing post-training compression techniques in terms of zero-shot performance, particularly when compressed to less than 2.5 bits per parameter. Adaptability: The method supports low-rank adaptation, which can further enhance the performance of the compressed models on specific tasks.

Weaknesses

Complexity: The algorithm involves a nested optimization process, which may introduce significant computational overhead during the compression phase. Dependency on Calibration Data: The performance of CALDERA relies on the availability and quality of calibration data, which may not always be accessible or representative. Limited Empirical Comparisons: While the article claims superiority over existing methods, the empirical comparisons might be limited in scope, potentially omitting some relevant state-of-the-art techniques. Potential Issues Quantization Artifacts: Aggressive quantization, especially at very low bit budgets, might introduce artifacts that could degrade model performance in specific scenarios. Generalization: The effectiveness of the method across a diverse range of LLMs and tasks needs thorough validation, as it might not generalize well beyond the tested models and datasets. Optimization Stability: The iterative nature of the optimization process might lead to stability issues, particularly for large models with highly non-convex loss landscapes.

Questions

See Weaknesses

Rating

4

Confidence

2

Soundness

2

Presentation

3

Contribution

2

Limitations

Yes

Reviewer ZG6L7/10 · confidence 4/52024-07-14

Summary

This work proposes a new decomposition procedure to achieve low-precision and low-rank compression of large language model (LLM) weight matrices. Such a new method could capture high singular components accurately while compressing less significant ones. An efficient algorithm is proposed to optimize the quantized backbone and low-rank factors, which can be fine-tuned to enhance the model performance. The work also provides a tighter approximation error bound and is validated by compressing the LlaMA LLMs to below 2.5 bits per parameter.

Strengths

1. The proposed CALDERA method can effectively compress LLMs without degrading the performance too much. And it is demonstrated through a series of experiments that the method is capable of model compression and low-rank adaptive fine-tuning at the same time. 2. The paper also provides a rigorous approximation error analysis of the proposed CALDERA method.

Weaknesses

I think the presented experiment study is limited. I mainly have the following suggestions. 1. It would be better to supplement the experiments with LoftQ and LQ-LoRA, and add a set of experiments with full parameter fine-tuning as a baseline. 2. Please provide an experimental comparison of model size. 3. It would be better to add some experiments on evaluating the computation cost of the proposed CALDERA.

Questions

1. Since the CALDERA method requires many time-consuming operations like SVD and matrix inversion, can this be improved in future work? 2. Are there any efficient ways to improve the selection strategy of the hyperparameter rank?

Rating

7

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

In my opinion, how to efficiently tune the hyperparameter rank is the main limitation of the proposed method.

Reviewer 23tr2024-08-07

I thank the authors for answering my questions and including additional experiments. I'll keep my score as is.

Authorsrebuttal2024-08-10

Further clarifications

Dear Reviewer 32tN, Please let us know if your queries have been addressed satisfactorily. As mentioned in our response, we've thoroughly incorporated your feedback, along with suggestions from the other reviewers. We hope that our response has positively influenced your perception of our work. If you require further clarifications to potentially reconsider your score, we are enthusiastic about engaging in further discussion. Please do not hesitate to contact us. We highly value the generous contribution of your time to review our paper.

Authorsrebuttal2024-08-10

Further clarifications

Dear Reviewer ZG6L, Please let us know if your queries have been addressed satisfactorily. As mentioned in our response, we've thoroughly incorporated your feedback, along with suggestions from the other reviewers. We hope that our response has positively influenced your perception of our work. If you require further clarifications to potentially reconsider your score, we are enthusiastic about engaging in further discussion. Please do not hesitate to contact us. We highly value the generous contribution of your time to review our paper.

Reviewer ZG6L2024-08-13

I think the authors have addressed my comments. I shall change my rating to 7.

Authorsrebuttal2024-08-12

Further clarifications

Dear Reviewer xRtR, Please let us know if your queries have been addressed satisfactorily. As mentioned in our response, we've thoroughly incorporated your feedback, along with suggestions from the other reviewers. We hope that our response has positively influenced your perception of our work. If you require further clarifications to potentially reconsider your score, we are enthusiastic about engaging in further discussion. Please do not hesitate to contact us. We highly value the generous contribution of your time to review our paper.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC