S$^{2}$FT: Efficient, Scalable and Generalizable LLM Fine-tuning by Structured Sparsity

Current PEFT methods for LLMs can achieve either high quality, efficient training, or scalable serving, but not all three simultaneously. To address this limitation, we investigate sparse fine-tuning and observe a remarkable improvement in generalization ability. Utilizing this key insight, we propose a family of Structured Sparse Fine-Tuning (S$^{2}$FT) methods for LLMs, which concurrently achieve state-of-the-art fine-tuning performance, training efficiency, and inference scalability. S$^{2}$FT accomplishes this by"selecting sparsely and computing densely". It selects a few heads and channels in the MHA and FFN modules for each Transformer block, respectively. Next, it co-permutes weight matrices on both sides of the coupled structures in LLMs to connect the selected components in each layer into a dense submatrix. Finally, S$^{2}$FT performs in-place gradient updates on all submatrices. Through theoretical analysis and empirical results, our method prevents forgetting while simplifying optimization, delivers SOTA performance on both commonsense and arithmetic reasoning with 4.6% and 1.3% average improvements compared to LoRA, and surpasses full FT by 11.5% when generalizing to various domains after instruction tuning. Using our partial backpropagation algorithm, S$^{2}$FT saves training memory up to 3$\times$ and improves latency by 1.5-2.7$\times$ compared to full FT, while delivering an average 10% improvement over LoRA on both metrics. We further demonstrate that the weight updates in S$^{2}$FT can be decoupled into adapters, enabling effective fusion, fast switch, and efficient parallelism for serving multiple fine-tuned models.

Paper

Similar papers

Peer review

Reviewer Cfys6/10 · confidence 4/52024-07-03

Summary

This paper aims to address the fact that the current parameter efficient fine-tuning methods cannot simultaneously achieve high-quality, efficient training or scalable LLM services. Therefore, a series of structured sparse fine-tuning methods for LLM are proposed, which simultaneously achieve state-of-the-art fine-tuning performance, training efficiency and reasoning scalability. S2FT achieves this through "sparse selection and dense computation". It only selects a few heads in the MHA module and a few channels in the FFN module in each Transformer block. Then the weight matrix of the coupling structure in the LLM is rearranged so that the selected parts are interconnected to generate multiple compact and dense trainable weight sub-matrices. S2FT only needs to update these sub-matrices for efficient parameter fine-tuning. The paper focuses on the fact that current methods such as LoRA, DoRA, etc., although they can reduce memory, are not as good as fine-tuning in large language models. The unstructured characteristics of SFT require matrix sparse operations, which makes service scalability and training efficiency impossible to guarantee. This is the main reason and motivation for the proposal of S2FT in this paper. In addition, this paper establishes an interface between S2FT and LoRA to support joint or non-joint computing paradigms.

Strengths

The idea of ​​this paper is very novel and valuable. It starts with the three problems that the current LLM model may encounter, namely training quality, efficient training, and service scalability. It proposes a structured sparse fine-tuning method to accelerate the large language model and provides corresponding mathematical proofs. This method is very effective for both in-distribution and out-of-distribution model training. The highlights of this paper are as follows: 1. The mathematical theoretical proof of this paper is very complete, the proof ideas are very clear, and the proofs of the in-distribution model and the out-of-distribution model are very complete. The conclusions and theoretical analysis of this paper are clearly seen, and the mathematical theory is very solid. 2. The analysis process of this paper is complete. The advantages and disadvantages of the current research are analyzed in place in the literature review part, the method part is concise and clear, and a complete theoretical proof is provided. The advantages of operating efficiency and service scalability are also analyzed in the experimental part. 3. The simplicity and clarity of this method is a highlight of this paper. Compared with the complicated fine-tuning methods of other methods, this paper only needs to select and rearrange the matrices of some layers for updating, and develops a partial back-propagation algorithm. The number of lines of code implemented is very small. Simplicity is a big highlight of this paper.

Weaknesses

The advantages of the S2FT method in this paper are very prominent, and it provides some references for efficient, scalable, and high-quality fine-tuning methods for large language models. However, the author can consider the following areas for improvement or sufficient explanation: 1. The symbols in the proof process of this paper can be slightly organized. Readers may feel that the symbols of the proof are a little messy when reading the entire proof process, but the whole process is complete and flawless. 2. There are few figures for the method in this paper, only the right picture of Figure 2 is shown, and the overall picture is not clear enough. In addition, does this method extract the same layer for each different model? Or is it better to extract specific layers for each model? 3. This paper locks the U of the low-rank decomposition matrix, which is a good attempt, but for different data sets, will the distribution of data affect the data form of the U matrix and the form of the U matrix basis? 4. In the experimental results, there are many phenomena that the method used in this paper is lower than the previous methods. Can the author analyze each task more fully, because it can be seen from the table that some tasks are more obviously degraded?

Questions

1. The symbols in the proof process of this paper can be slightly organized. Readers may feel that the symbols of the proof are a little messy when reading the entire proof process, but the whole process is complete and flawless. 2. There are few figures for the method in this paper, only the right picture of Figure 2 is shown, and the overall picture is not clear enough. In addition, does this method extract the same layer for each different model? Or is it better to extract specific layers for each model? 3. This paper locks the U of the low-rank decomposition matrix, which is a good attempt, but for different data sets, will the distribution of data affect the data form of the U matrix and the form of the U matrix basis? 4. In the experimental results, there are many phenomena that the method used in this paper is lower than the previous methods. Can the author analyze each task more fully, because it can be seen from the table that some tasks are more obviously degraded?

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

This paper mentions some limitations of this paper in the limitations. For example, although various model architectures show coupled structures, this paper does not explore the opportunity to extend S2FT to other architectures. At the same time, in terms of model deployment, although this paper verifies the feasibility of scalable services in the work, there is still a lack of a practical and scalable actual service system. However, when using this method, is it necessary to consider the fairness or importance of each layer? For example, for a large language model, the first layer may contain more information, and some information in the middle layer can be appropriately eliminated. Secondly, whether it is truly quality-oriented needs to be considered because S2FT does not perform well in any task in the experiment of this paper. Finally, this paper also mentions that the subsequent optimization direction may be targeted at the residual dependency network, and how to perform S2FT on this type of network needs further consideration. However, since the work of this paper mainly focuses on PEFT, it leads to a reduction in GPU computing resource consumption. Therefore, this method has the potential to have a positive impact on the computing environment by minimizing the computing resources required for fine-tuning LLM.

Authorsrebuttal2024-08-12

Reminder on follow-up discussion (2 days left before the discussion period ends)

Thank you so much for your dedicated review of our paper. We recognize the significant time and effort involved in your review, and we greatly appreciate it. With only 2 days remaining before the conclusion of the discussion phase, we wish to extend a respectful request for your feedback about our responses. Thank you!

Reviewer Cfys2024-08-13

Response to authors' rebuttal

Author's rebuttal mostly addresses my concern. I will change the score.

Reviewer d9g65/10 · confidence 4/52024-07-10

Summary

The paper introduces a structured pruning method for LLMs. The main idea is to permute the rows and columns of the weight matrices and select a submatrix during the fine-tuning process. The authors show that the proposed technique outperform previous techniques in terms of accuracy and efficiency.

Strengths

1. The paper is well written. The authors gave a good summary of existing parameter-efficient fine-tuning (PEFT) methods. While the proposed technique itself is not entirely new (it can be considered as a special form of structured sparse training), the authors described the technique clearly. 2. Theoretical analysis is provided for generalization performance. 3. Experiments are comprehensive. The authors tested their technique for two types of tasks (commonsense reasoning and instruction-following) with five fine-tuning categories on more than 10 datasets.

Weaknesses

Novelty in the pruning technique itself is limited. It is basically a structured sparse training method. Similar structured pruning methods have been proposed on non-LLM models previously (e.g., [27, 24]).

Questions

Will the authors open-source the code?

Rating

5

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

Yes.

Authorsrebuttal2024-08-12

Reminder on follow-up discussion (2 days left before the discussion period ends)

Thank you so much for your dedicated review of our paper. We recognize the significant time and effort involved in your review, and we greatly appreciate it. With only 2 days remaining before the conclusion of the discussion phase, we wish to extend a respectful request for your feedback about our responses. Thank you!

Reviewer 8C1L6/10 · confidence 4/52024-07-12

Summary

Current PEFT methods for LLMs fail to achieve high quality, efficient training, and scalable serving simultaneously. To overcome this, the authors developed Structured Sparse Fine-Tuning (S²FT), which excels in all three areas. S²FT improves generalization by selecting a few heads in the Multi-Head Attention (MHA) and channels in the Feed-Forward Network (FFN) modules for each Transformer block. It forms dense, trainable submatrices by co-permuting weight matrices, preventing overfitting and forgetting. S²FT achieves state-of-the-art performance and reduces fine-tuning memory usage by up to 3 times and increases throughput by 1.5-2.7 times.

Strengths

1. This paper is well-written and organized. The proposed method is technically sound. 2. Efficient tuning of LLMs is an important topic. 3. The performance of the proposed method is very promising.

Weaknesses

1. The author claimed that S2FT prevent overfitting and forgetting. However except the toy experiments in 2nd section, I did not see any experimental proof. E.g. The author only gives MTBench results after the finetuning on AlpacaGPT4, what about the overfitting and forgetting issues? 2. Experiments only conducted on relative small models. 3. The name SFT may incur some confusions as it already has the meaning of supervised fine-tuning. 4. The experiments parts are not sufficient to proof the effectiveness of the proposed method especially on some downstream tasks.

Questions

1. The author has some ablations on the trainable allocation choice within a block, what about the allocation in different layers? 2. Can this paper be combined with quantization just like QLoRA.

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

Yes

Authorsrebuttal2024-08-12

Reminder on follow-up discussion (2 days left before the discussion period ends)

Thank you so much for your dedicated review of our paper. We recognize the significant time and effort involved in your review, and we greatly appreciate it. With only 2 days remaining before the conclusion of the discussion phase, we wish to extend a respectful request for your feedback about our responses. Thank you!

Reviewer 8C1L2024-08-12

Thanks for the authors' response. I have no more questions right now. I choose not to change the scores.

Reviewer CFWk5/10 · confidence 3/52024-07-13

Summary

This paper introduces a new family of methods called Structured Sparse Fine-Tuning (S$^2$FT) for large language models (LLMs). S$^2$FT aims to achieve state-of-the-art fine-tuning performance, training efficiency, and inference scalability simultaneously. The method selects a few heads in the multi-head attention (MHA) module and a few channels in the feed-forward network (FFN) module for each Transformer block, then co-permutes the weight matrices to connect these selected components. This results in multiple compact, dense, and trainable weight submatrices that are updated during fine-tuning. The approach prevents overfitting and forgetting, delivers superior performance on benchmarks, and improves memory and throughput efficiency compared to full fine-tuning and existing parameter-efficient fine-tuning (PEFT) methods.

Strengths

This paper introduces a method combining structured sparsity with fine-tuning, enhancing both efficiency and performance. The method proposed can reduce memory costs and improve throughput. The method demonstrates strong generalization capabilities. The approach allows for scalable batched serving of multiple fine-tuned models without additional inference overhead. The experiments are comprehensive.

Weaknesses

While the results look impressive, the reviewer is not fully convinced by the theoretical motivations. For example, the paper relies on the assumption that structured sparsity can effectively represent the necessary model adaptations, which is hard to verify in realistic settings. Although the benchmarks are comprehensive, most of the benchmarks do not include SFT or other SFT-based methods. Since S$^2$FT is in some sense an SFT-based method, it would be necessary to include such comparisons to understand if the performance improvements come from the "structure" (i.e. the $^2$) or SFT itself. Based on the current benchmarks, it is difficult to make such conclusions. While the paper includes some implementation details, aiding reproducibility, the code is not provided, making it hard to verify or reproduce the results, especially for a paper with mostly empirical results.

Questions

Could the authors elaborate on the scaling of trainable parameters, as well as the space and time complexity, compared to other SFT-based or LoRA-based methods? Could the authors elaborate on how the hyperparameters are chosen, and provide a more comprehensive list of hyperparameters used in this paper, the procedure to choose them, and the discarded hyperparameters? Right now, the paper mainly discusses how to apply S$^2$FT to attention-based LLMs. The reviewer wonders how to identify the important weights and apply this method to other models. Most of the experiments were performed on LLaMA and LLaMA2. The reviewer wonders if there is any difficulty in applying the method to LLaMA3. Is it possible that different datasets/tasks could result in a different set of "important weights"? The reviewer wonders if the authors explored this possibility. The reviewer wonders if the author could release the source code into an anonymous repository for review purposes. In the NeurIPS checklist, the author claims that their results include confidence intervals. Could the authors make some comments on the confidence intervals for the tables in the paper?

Rating

5

Confidence

3

Soundness

3

Presentation

3

Contribution

2

Limitations

The limitations and broader impacts are addressed.

Authorsrebuttal2024-08-08

Code Release in an Anonymous Repository

To facilitate reproduction, we have provided our code at https://anonymous.4open.science/r/S2FT_Rebuttal-7B17 for reviewer’s verification and will make it publicly available upon paper acceptance. This repository contains the training and inference code necessary to fine-tune a LLaMA-7B model on commonsense reasoning tasks. We hope this addresses your reproduction concerns.

Authorsrebuttal2024-08-08

Code Release in an Anonymous Repository

To facilitate reproduction, we have provided our code at https://anonymous.4open.science/r/S2FT_Rebuttal-7B17 for reviewer’s verification and will make it publicly available upon paper acceptance. This repository contains the training and inference code necessary to fine-tune a LLaMA-7B model on commonsense reasoning tasks. We hope this addresses the reproduction concerns raised by Reviewer CFWk and Reviewer d9g6.

Authorsrebuttal2024-08-08

Code Release in an Anonymous Repository

To facilitate reproduction, we have provided our code at https://anonymous.4open.science/r/S2FT_Rebuttal-7B17 for reviewer’s verification and will make it publicly available upon paper acceptance. This repository contains the training and inference code necessary to fine-tune a LLaMA-7B model on commonsense reasoning tasks. We hope this addresses your reproduction concerns.

Reviewer CFWk2024-08-11

Thanks a lot for taking the time and effort to answer my questions. I would like to keep my recommendation for acceptance of the paper, and am considering raising the score in the next 2 days.

Authorsrebuttal2024-08-12

Thank you very much for your response. Please don't hesitate to reach out if you have any further questions. We greatly appreciate your willingness to consider raising the score.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC