Unified Parameter-Efficient Fine-Tuning of 100+ LLMs
Project description
Parameter-Efficient Fine-Tuning made easy
PEFT-Factory is a fork of LLaMa-Factory ❤️, upgraded with easy to use PEFT interface, support for HuggingFace PEFT methods and datasets for benchmarking PEFT.
Installation
⚠️ Currently, the best way is to install from this repository. This will change soon.
Clone the repository
git clone git@github.com:Wicwik/PEFT-Factory.git
Build the wheel
make build
Install wiht pip
pip install dist/llamafactory-0.9.4.dev0-py3-none-any.whl
Quickstart
Quick start of prefix tuning with LLaMa3-8B-Instruct for CB dataset. We are using the template from examples directory, but feel free to use your own config.yml.
Create some variables for envsubst
TIMESTAMP=`date +%s`
OUTPUT_DIR="saves/prefix-tuning/llama-3-8b-instruct/train_cb_${TIMESTAMP}"
DATASET="cb"
SEED=123
WANDB_PROJECT="peft-factory-train-prefix-tuning"
WANDB_NAME="prefix-tuning_llama-3-8b-instruct_train_cb"
mkdir -p "${OUTPUT_DIR}"
export OUTPUT_DIR DATASET SEED WANDB_PROJECT WANDB_NAME
Use the template
Utility envsubst replaces the occurances of env variables with their values (see the template).
envsubst < examples/peft/prefix-tuning/llama-3-8b-instruct/train.yaml > ${OUTPUT_DIR}/train.yaml
Run the factory
llamafactory-cli train ${OUTPUT_DIR}/train.yaml
Supported methods
| PEFT method name | Support |
|---|---|
| LoRA (including variants) | ✅ 🦙 |
| Prefix Tuning | ✅ 🤗 |
| Prompt Tuning | ✅ 🤗 |
| P-Tuning | ✅ 🤗 |
| LNTuning | ✅ 🤗 |
| SVD | ✅ ⚙️ |
| BitFit | ✅ ⚙️ |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file peftfactory-0.9.4.4.tar.gz.
File metadata
- Download URL: peftfactory-0.9.4.4.tar.gz
- Upload date:
- Size: 222.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
155a82fd614f6e9f368bcc60648fdaaa4e248f4e3b1cba79b64a872b164541a7
|
|
| MD5 |
82d00e925d0dd0f96879ee1f70a3a309
|
|
| BLAKE2b-256 |
6113c0f3c853db22d6876cd8e8b26b1e6fec68e270e32f5db5f1a88b6a3b1111
|
Provenance
The following attestation bundles were made for peftfactory-0.9.4.4.tar.gz:
Publisher:
publish.yml on kinit-sk/PEFT-Factory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peftfactory-0.9.4.4.tar.gz -
Subject digest:
155a82fd614f6e9f368bcc60648fdaaa4e248f4e3b1cba79b64a872b164541a7 - Sigstore transparency entry: 729333486
- Sigstore integration time:
-
Permalink:
kinit-sk/PEFT-Factory@c1f8b1ac9c5aa6acc51bb90edd296e3fa1e88665 -
Branch / Tag:
refs/tags/v0.9.4.4 - Owner: https://github.com/kinit-sk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c1f8b1ac9c5aa6acc51bb90edd296e3fa1e88665 -
Trigger Event:
release
-
Statement type:
File details
Details for the file peftfactory-0.9.4.4-py3-none-any.whl.
File metadata
- Download URL: peftfactory-0.9.4.4-py3-none-any.whl
- Upload date:
- Size: 311.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ae74526460983238a08c17b15c816ee932bdc5b9531e4280525a2238d9f5162
|
|
| MD5 |
d0398906734093818fb8de1f5fc844c2
|
|
| BLAKE2b-256 |
f134a7b00fb818421d64f2ddd60f72f2c3bdf67415e98b73e5ba14f3d42b110c
|
Provenance
The following attestation bundles were made for peftfactory-0.9.4.4-py3-none-any.whl:
Publisher:
publish.yml on kinit-sk/PEFT-Factory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peftfactory-0.9.4.4-py3-none-any.whl -
Subject digest:
1ae74526460983238a08c17b15c816ee932bdc5b9531e4280525a2238d9f5162 - Sigstore transparency entry: 729333498
- Sigstore integration time:
-
Permalink:
kinit-sk/PEFT-Factory@c1f8b1ac9c5aa6acc51bb90edd296e3fa1e88665 -
Branch / Tag:
refs/tags/v0.9.4.4 - Owner: https://github.com/kinit-sk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c1f8b1ac9c5aa6acc51bb90edd296e3fa1e88665 -
Trigger Event:
release
-
Statement type: