mirror of
https://github.com/wassname/peft.git
synced 2026-09-24 13:40:15 +08:00
2ab8b95867fe052df4e098b3f397ff7068cb1a90
🤗 PET
Parameter-Efficient Tuning. Intergrated with 🤗 Accelerate to scale seamlessly to large models using PyTorch FSDP.
Supported methods:
- LoRA
- Prefix Tuning
- P-Tuning
- Prompt Tuning
Models support matrix
Sequence Classification
| Model | LoRA | Prefix Tuning | P-Tuning | Prompt Tuning |
|---|---|---|---|---|
| BERT | ✅ | ✅ | ✅ | ✅ |
| RoBERTa | ✅ | ✅ | ✅ | ✅ |
| GPT-2 | ✅ | ✅ | ✅ | ✅ |
| Bloom | ✅ | ✅ | ✅ | ✅ |
| OPT | ✅ | ✅ | ✅ | ✅ |
| GPT-Neo | ✅ | ✅ | ✅ | ✅ |
| GPT-J | ✅ | ✅ | ✅ | ✅ |
| Deberta | ✅ | |||
| Deberta-v2 | ✅ |
Causal Language Modeling
| Model | LoRA | Prefix Tuning | P-Tuning | Prompt Tuning |
|---|---|---|---|---|
| GPT-2 | ✅ | ✅ | ✅ | ✅ |
| Bloom | ✅ | ✅ | ✅ | ✅ |
| OPT | ✅ | ✅ | ✅ | ✅ |
| GPT-Neo | ✅ | ✅ | ✅ | ✅ |
| GPT-J | ✅ | ✅ | ✅ | ✅ |
Conditional Generation
| Model | LoRA | Prefix Tuning | P-Tuning | Prompt Tuning |
|---|---|---|---|---|
| T5 | ✅ | ✅ | ✅ | ✅ |
| BART | ✅ | ✅ | ✅ | ✅ |
Caveats:
- Doesn't work currently with DeeSpeed ZeRO Stage-3. Extending support with DeeSpeed ZeRO Stage-3 is in backlog.
Languages
Python
99.8%
Makefile
0.2%