mirror of
https://github.com/wassname/peft.git
synced 2026-09-17 12:30:15 +08:00
207eb07f03137da29e4b0e917f6330368766e7c2
🤗 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%