PEFT documentation

PEFT types

You are viewing v0.13.0 version. A newer version v0.14.0 is available.
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

PEFT types

PeftType includes the supported adapters in PEFT, and TaskType includes PEFT-supported tasks.

PeftType

class peft.PeftType

< >

( value names = None module = None qualname = None type = None start = 1 )

Enum class for the different types of adapters in PEFT.

Supported PEFT types:

  • PROMPT_TUNING
  • MULTITASK_PROMPT_TUNING
  • P_TUNING
  • PREFIX_TUNING
  • LORA
  • ADALORA
  • BOFT
  • ADAPTION_PROMPT
  • IA3
  • LOHA
  • LOKR
  • OFT
  • XLORA
  • POLY
  • LN_TUNING
  • VERA
  • FOURIERFT
  • HRA

TaskType

class peft.TaskType

< >

( value names = None module = None qualname = None type = None start = 1 )

Enum class for the different types of tasks supported by PEFT.

Overview of the supported task types:

  • SEQ_CLS: Text classification.
  • SEQ_2_SEQ_LM: Sequence-to-sequence language modeling.
  • CAUSAL_LM: Causal language modeling.
  • TOKEN_CLS: Token classification.
  • QUESTION_ANS: Question answering.
  • FEATURE_EXTRACTION: Feature extraction. Provides the hidden states which can be used as embeddings or features for downstream tasks.
< > Update on GitHub