Subspace-Tuning

A generalized framework for subspace tuning methods in parameter efficient fine-tuning.

APACHE-2.0 License

Stars
94
Committers
3

📘 Introduction

Welcome to our repository, which contains a diverse collection of Subspace Tuning methods for Parameter-Efficient Fine-Tuning (PEFT). Subspace Tuning are essential for adapting large pre-trained models to specific tasks with minimal changes to the original parameters. It endeavors to identify the maximal projection of the optimal weight $\mathbf{W}^{*}$ onto the subspace spanned by the bases of $\phi(\mathbf{W})$, where $\phi(\mathbf{W})$ denotes the subspace transformation of the original frozen weight $\mathbf{W}$. For more details, please refer to the original paper.

We aim to provide a comprehensive resource for researchers and practitioners in this field, and facilitate easy integration into your projects. Whether you are here to find resources for your projects or to contribute, we hope this repository will be a valuable and inspiring part of your research journey.

Information Box

This repository also contains some of the other projects we have worked on, which might have led you here.

  • LoRA-Dash: Unleashing the Power of Task-Specific Directions in Parameter Efficient Fine-tuning.
  • FLoRA: FLoRA: Low-Rank Core Space for N-dimension.

💥 News

  • [2024.09.04] 🔥🔥 Add Method LoRA-Dash and Task Subject-driven Generation to Our Repo!
  • [2024.08.18] 🔥🔥 Add Task Math Reasoning to Our Repo!
  • [2024.07.22] 🔥🔥 Add Methods PISSA, MiLoRA and Spectral Adapter to Our Repo!
  • [2024.07.09] 🔥🔥 Repository Constructed!

📝 Todo List

  • Nothing to do yet.

🛠️ Usage

To use the algorithms in this repository, clone the repository and install the necessary dependencies.

  1. Clone this Repository:

    git clone https://github.com/Chongjie-Si/Subspace-Tuning.git
    cd Subspace-Tuning
    
  2. Follow the Instructions in Each Folder.

🎯 Tasks

We support several tasks including:

  • Natural Language Understanding (NLU)
  • Natural Language Generation (NLG)
  • Question Answering (QA)
  • Commonsense Reasoning (CR)
  • Math Reasoning (MR)
  • Subject-driven Generation (SdG)
  • ...

🔍 Algorithms

Based on subspace tuning theory, PEFT methods are classified into three categories: reconstruction-based, extension-based and combination-based.

We implement different methods mainly in loralib/.

We have also tested the performance of some algorithms on NLU and CR tasks.

🎁 Contribution

We welcome contributions to this repository! Whether you’re fixing bugs, adding new features, or improving documentation, your help is appreciated. Please follow the guidelines to ensure a smooth contribution process.

💡 Further Information

Thank you for your interest in our PEFT code repository. We strive to make this a valuable resource for your projects and research endeavors.

Our goal is to foster a collaborative environment where both you and our researchers can exchange ideas and cooperate. Beyond discussing code-related issues, we encourage you to share your perspectives on any PEFT methodology and address any potential challenges you encounter. We welcome discussions that may spark new insights and innovations.

Besides, this code repository is of a more private nature, containing tasks and algorithms that I use during my experiments. If you have any algorithms you’d like to implement or wish to add more task scenarios, please feel free to send email to me. You can also visit my personal homepage for more details.

📧 Contact

If you have any questions, suggestions, or feedback, please feel free to contact us at [email protected].

🔗 Citation

If you find this repository useful, please consider giving it a star and citing it in your work:

@article{si2024see,
  title={See Further for Parameter Efficient Fine-tuning by Standing on the Shoulders of Decomposition},
  author={Si, Chongjie and Yang, Xiaokang and Shen, Wei},
  journal={arXiv preprint arXiv:2407.05417},
  year={2024}
}

This repository also contains the code for our other projects. If you find these methods useful, please consider giving a star and citing them in your work.

FLoRA: Low-Rank Core Space for N-dimension

@article{si2024flora,
  title={FLoRA: Low-Rank Core Space for N-dimension},
  author={Si, Chongjie* and Wang, Xuehui* and Yang, Xue and Xu, Zhengqin and Li, Qingyun and Dai, Jifeng and Qiao, Yu and Yang, Xiaokang and Shen, Wei},
  journal={arXiv preprint arXiv:2405.14739},
  year={2024}
}

Unleashing the Power of Task-Specific Directions in Parameter Efficient Fine-tuning

@article{si2024unleashing,
  title={Unleashing the Power of Task-Specific Directions in Parameter Efficient Fine-tuning},
  author={Si, Chongjie* and Shi, Zhiyi* and Zhang, Shifan and Yang, Xiaokang and Pfister, Hanspeter and Shen, Wei},
  journal={arXiv preprint arXiv:2409.01035},
  year={2024}
}

📄 License

This repository is licensed under the Apache 2.0 license. See the LICENSE file for more details.

Related Projects