PEFT
  • 🌍GET STARTED
    • BOINC AI PEFT
    • Quicktour
    • Installation
  • 🌍TASK GUIDES
    • Image classification using LoRA
    • Prefix tuning for conditional generation
    • Prompt tuning for causal language modeling
    • Semantic segmentation using LoRA
    • P-tuning for sequence classification
    • Dreambooth fine-tuning with LoRA
    • LoRA for token classification
    • int8 training for automatic speech recognition
    • Semantic similarity with LoRA
  • 🌍DEVELOPER GUIDES
    • Working with custom models
    • PEFT low level API
    • Contributing to PEFT
    • Troubleshooting
  • 🌍ACCELERATE INTEGRATIONS
    • DeepSpeed
    • PagFully Sharded Data Parallele 2
  • 🌍CONCEPTUAL GUIDES
    • LoRA
    • Prompting
    • IA3
  • 🌍REFERENCE
    • PEFT model
    • Configuration
    • Tuners
Powered by GitBook
On this page
  • PEFT
  • Supported methods
  • Supported models
  1. GET STARTED

BOINC AI PEFT

PreviousGET STARTEDNextQuicktour

Last updated 1 year ago

PEFT

🌍 PEFT, or Parameter-Efficient Fine-Tuning (PEFT), is a library for efficiently adapting pre-trained language models (PLMs) to various downstream applications without fine-tuning all the model’s parameters. PEFT methods only fine-tune a small number of (extra) model parameters, significantly decreasing computational and storage costs because fine-tuning large-scale PLMs is prohibitively costly. Recent state-of-the-art PEFT techniques achieve performance comparable to that of full fine-tuning.

PEFT is seamlessly integrated with 🌍 Accelerate for large-scale models leveraging DeepSpeed and .

Supported methods

  1. LoRA:

  2. Prefix Tuning: ,

  3. P-Tuning:

  4. Prompt Tuning:

  5. AdaLoRA:

  6. IA3:

Supported models

The tables provided below list the PEFT methods and models supported for each task. To apply a particular PEFT method for a task, please refer to the corresponding Task guides.

Causal Language Modeling

Model
LoRA
Prefix Tuning
P-Tuning
Prompt Tuning
IA3

GPT-2

βœ…

βœ…

βœ…

βœ…

βœ…

Bloom

βœ…

βœ…

βœ…

βœ…

βœ…

OPT

βœ…

βœ…

βœ…

βœ…

βœ…

GPT-Neo

βœ…

βœ…

βœ…

βœ…

βœ…

GPT-J

βœ…

βœ…

βœ…

βœ…

βœ…

GPT-NeoX-20B

βœ…

βœ…

βœ…

βœ…

βœ…

LLaMA

βœ…

βœ…

βœ…

βœ…

βœ…

ChatGLM

βœ…

βœ…

βœ…

βœ…

βœ…

Conditional Generation

Model
LoRA
Prefix Tuning
P-Tuning
Prompt Tuning
IA3

T5

βœ…

βœ…

βœ…

βœ…

βœ…

BART

βœ…

βœ…

βœ…

βœ…

βœ…

Sequence Classification

Model
LoRA
Prefix Tuning
P-Tuning
Prompt Tuning
IA3

BERT

βœ…

βœ…

βœ…

βœ…

βœ…

RoBERTa

βœ…

βœ…

βœ…

βœ…

βœ…

GPT-2

βœ…

βœ…

βœ…

βœ…

Bloom

βœ…

βœ…

βœ…

βœ…

OPT

βœ…

βœ…

βœ…

βœ…

GPT-Neo

βœ…

βœ…

βœ…

βœ…

GPT-J

βœ…

βœ…

βœ…

βœ…

Deberta

βœ…

βœ…

βœ…

Deberta-v2

βœ…

βœ…

βœ…

Token Classification

Model
LoRA
Prefix Tuning
P-Tuning
Prompt Tuning
IA3

BERT

βœ…

βœ…

RoBERTa

βœ…

βœ…

GPT-2

βœ…

βœ…

Bloom

βœ…

βœ…

OPT

βœ…

βœ…

GPT-Neo

βœ…

βœ…

GPT-J

βœ…

βœ…

Deberta

βœ…

Deberta-v2

βœ…

Text-to-Image Generation

Model
LoRA
Prefix Tuning
P-Tuning
Prompt Tuning
IA3

Stable Diffusion

βœ…

Image Classification

Model
LoRA
Prefix Tuning
P-Tuning
Prompt Tuning
IA3

ViT

βœ…

Swin

βœ…

Image to text (Multi-modal models)

Model
LoRA
Prefix Tuning
P-Tuning
Prompt Tuning
IA3

Blip-2

βœ…

Semantic Segmentation

Model
LoRA
Prefix Tuning
P-Tuning
Prompt Tuning
IA3

SegFormer

βœ…

We have tested LoRA for and for fine-tuning on image classification. However, it should be possible to use LoRA for any from 🌍 Transformers. Check out the task guide to learn more. If you run into problems, please open an issue.

As with image-to-text models, you should be able to apply LoRA to any of the . It’s worth noting that we haven’t tested this with every architecture yet. Therefore, if you come across any issues, kindly create an issue report.

🌍
Big Model Inference
LORA: LOW-RANK ADAPTATION OF LARGE LANGUAGE MODELS
Prefix-Tuning: Optimizing Continuous Prompts for Generation
P-Tuning v2: Prompt Tuning Can Be Comparable to Fine-tuning Universally Across Scales and Tasks
GPT Understands, Too
The Power of Scale for Parameter-Efficient Prompt Tuning
Adaptive Budget Allocation for Parameter-Efficient Fine-Tuning
LLaMA-Adapter: Efficient Fine-tuning of Language Models with Zero-init Attention
Infused Adapter by Inhibiting and Amplifying Inner Activations
ViT
Swin
ViT-based model
Image classification
segmentation models