https://github.com/aim-uofa/loraprune
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.8%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: aim-uofa
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 180 KB
Statistics
- Stars: 55
- Watchers: 3
- Forks: 5
- Open Issues: 6
- Releases: 0
Metadata Files
README.md
Introduction
LoRAPrune: Pruning Meets Low-Rank Parameter-Efficient Fine-Tuning [arXiv]
Mingyang Zhang1,2, Hao Chen1, Chunhua Shen1,3, Zhen Yang1, Linlin Ou2, Xinyi Yu2, Bohan Zhuang1
Zhejiang University1, Zhejiang University of Technology2, Ant Group3
This repository contains code for reproducing LoRAPrune. LoRAPrune can iteratively prune LPMs in a memory-efficient manner. Specifically, LoRAPrune uses a LoRA-guided pruning criterion, which uses the weights and gradients of LoRA, rather than the gradients of pre-trained weights for importance estimation.
Updates:
- June, 20, 2024: Code is released!
- May, 20, 2024: LoRAPrune is accepted by ACL 2024 Findings!
TODO List:
- [ ] Support more LLMs.
Quick Start
Installation
pip install -r requirement.txt
Prune LPMs
sh script/prune.sh
This script would compress the LLaMA-7B model. You need to download LLaMA-7B pretrained weights. The dataset would be automatically downloaded and sampled. You also can prune more larger LPMs, e.g., LLaMA-13B, LLaMA-30B and LLaMA-65B.
To save GPU memory, you can optionally quantize the pre-trained weights to 8 bits by adding --load_in_8bit.
Evaluate results
sh script/evaluate.sh
After pruning, you can evalute the pruning resutls on Wixitext2 and PTB datasets.
License
For non-commercial academic use, this project is licensed under the 2-clause BSD License. For commercial use, please contact Chunhua Shen.
Citation
If you find this project useful, please cite
@misc{zhang2023pruning,
title={Pruning Meets Low-Rank Parameter-Efficient Fine-Tuning},
author={Mingyang Zhang and Hao Chen and Chunhua Shen and Zhen Yang and Linlin Ou and Xinyi Yu and Bohan Zhuang},
year={2023},
eprint={2305.18403},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
Owner
- Name: Advanced Intelligent Machines (AIM)
- Login: aim-uofa
- Kind: organization
- Location: China
- Repositories: 23
- Profile: https://github.com/aim-uofa
A research team at Zhejiang University, focusing on Computer Vision and broad AI research ...
GitHub Events
Total
- Issues event: 4
- Watch event: 29
- Issue comment event: 7
- Push event: 1
- Pull request event: 2
- Fork event: 6
Last Year
- Issues event: 4
- Watch event: 29
- Issue comment event: 7
- Push event: 1
- Pull request event: 2
- Fork event: 6
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| myzhangCS | 3****r | 2 |
| WoutDeRijck | d****1@i****m | 2 |
| Chunhua Shen | 1****n | 1 |
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 6
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 10 days
- Total issue authors: 6
- Total pull request authors: 1
- Average comments per issue: 0.33
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 4
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 10 days
- Issue authors: 4
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- soonchangAI (1)
- HiFei4869 (1)
- zl-comment (1)
- 33answer33 (1)
- WoutDeRijck (1)
- mli-tian (1)
- SkanderGhariani (1)
Pull Request Authors
- WoutDeRijck (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- accelerate *
- appdirs *
- bitsandbytes ==0.40.2
- black *
- datasets *
- fire *
- gradio *
- peft ==0.2.0
- sentencepiece *
- torch >=1.7.1
- transformers ==4.28.1