AIoT-MLSys-Lab / SVD-LLM

Official Code for "SVD-LLM: Truncation-aware Singular Value Decomposition for Large Language Model Compression"
https://arxiv.org/abs/2403.07378
Apache License 2.0
90 stars 7 forks source link

Clarification on Compression Ratio and Parameter Counting in the Code #16

Closed pvti closed 5 days ago

pvti commented 5 days ago

Hi,

First of all, thank you for your excellent work! I have a few questions regarding the term "compression ratio" as it's used in the manuscript and code.

You often mention compression ratios, such as evaluating models at 20%, 60%, etc. However, I'm unsure if this percentage refers to:

  1. The percentage of singular values to retain (e.g., if the matrix has 100 singular values, does a 20% compression ratio mean removing the least important 20 and retaining 80?).

  2. The reduction in the total number of model parameters (e.g., for LLaMA2 7B, does 20% mean reducing the model by 1.4 billion parameters?).

From the code, it seems like you're using the first interpretation, where the percentage refers to the singular values retained. Could you please confirm?

Additionally, if the focus is on the percentage of singular values retained, do you think it might be beneficial to incorporate an external library (e.g., DeepSpeed) to count the parameters in the compressed model? This could make comparisons between different compression methods easier. For instance, comparing methods like SVD with pruning becomes clearer when we can directly assess the parameter count reduction.

Given the growing attention on your work (alongside approaches like FWSVD, ASVD, and MoDeGPT, which were recently submitted to ICLR`25), I believe establishing a clear, parameter-based comparison framework will be crucial for future research in low-rank compression for LLMs. This would also encourage others to build on your open-source contributions.

Thanks again for your time and consideration!

tuidan commented 5 days ago

Hi, Thanks for your questions!

pvti commented 5 days ago

Thank you very much for your reply!