PEFT documentation
PEFT types
Get started
Tutorial
PEFT method guides
Developer guides
Model mergingQuantizationLoRACustom modelsAdapter injectionMixed adapter typestorch.compileContribute to PEFTTroubleshootingPEFT checkpoint format
🤗 Accelerate integrations
Conceptual guides
API reference
Main classes
Adapters
AdaLoRAAdaMSSIA3Llama-AdapterLoHaLoKrLoRAOSFX-LoRALyCORISMultitask Prompt TuningOFTBOFTPSOFTPolytroponP-tuningPrefix tuningCartridgesPrompt tuningLayernorm tuningVeRAPVeRAFourierFTGraLoRAVB-LoRAHiRAHRACPTTrainable TokensRandLoraSHiRAC3AMiSSRoAdWaveFTDeLoRATinyLoRALilyPEANuTBEFT
Utilities
You are viewing main version, which requires installation from source. If you'd like
regular pip install, checkout the latest stable version (v0.19.0).
PEFT types
PeftType includes the supported adapters in PEFT, and TaskType includes PEFT-supported tasks.
PeftType
class peft.PeftType
< source >( 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
- BEFT
- LOHA
- LOKR
- OFT
- XLORA
- POLY
- LN_TUNING
- VERA
- FOURIERFT
- HRA
- BONE
- MISS
- RANDLORA
- SHIRA
- C3A
- ROAD
- WAVEFT
- OSF
- DELORA
- GRALORA
- ADAMSS
TaskType
class peft.TaskType
< source >( 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.