PEFT documentation

AutoPeftModels

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

and get access to the augmented documentation experience

to get started

AutoPeftModels

The AutoPeftModel classes loads the appropriate PEFT model for the task type by automatically inferring it from the configuration file. They are designed to quickly and easily load a PEFT model in a single line of code without having to worry about which exact model class you need or manually loading a PeftConfig.

AutoPeftModel

class peft.AutoPeftModel

< >

( *args **kwargs )

from_pretrained

< >

( pretrained_model_name_or_path adapter_name: str = 'default' is_trainable: bool = False config: Optional[PeftConfig] = None **kwargs )

A wrapper around all the preprocessing steps a user needs to perform in order to load a PEFT model. The kwargs are passed along to PeftConfig that automatically takes care of filtering the kwargs of the Hub methods and the config object init.

AutoPeftModelForCausalLM

class peft.AutoPeftModelForCausalLM

< >

( *args **kwargs )

AutoPeftModelForSeq2SeqLM

class peft.AutoPeftModelForSeq2SeqLM

< >

( *args **kwargs )

AutoPeftModelForSequenceClassification

class peft.AutoPeftModelForSequenceClassification

< >

( *args **kwargs )

AutoPeftModelForTokenClassification

class peft.AutoPeftModelForTokenClassification

< >

( *args **kwargs )

AutoPeftModelForQuestionAnswering

class peft.AutoPeftModelForQuestionAnswering

< >

( *args **kwargs )

AutoPeftModelForFeatureExtraction

class peft.AutoPeftModelForFeatureExtraction

< >

( *args **kwargs )