Buckets:
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[[peft.AutoPeftModel]]
peft.AutoPeftModel[[peft.AutoPeftModel]]
from_pretrainedpeft.AutoPeftModel.from_pretrainedhttps://github.com/huggingface/peft/blob/vr_3202/src/peft/auto.py#L88[{"name": "pretrained_model_name_or_path", "val": ""}, {"name": "adapter_name", "val": ": str = 'default'"}, {"name": "is_trainable", "val": ": bool = False"}, {"name": "config", "val": ": Optional[PeftConfig] = None"}, {"name": "revision", "val": ": Optional[str] = None"}, {"name": "import_allowlist", "val": ": Optional[list[str]] = None"}, {"name": "**kwargs", "val": ""}]- import_allowlist (list[str], optional, defaults to {get_default_import_allowlist()}) --
AutoPeftModel will attempt to instantiate the base model that is configured in the adapter config.
Since this operation needs to potentially import other packages, this allowlist is a safe-guard to
prevent importing malicious packages. You may need to specify your package's import name here if it is
not in the defaults.0
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.
The parameters are equivalent to the ones of PeftModel.from_pretrained(). Differences are documented below.
Parameters:
import_allowlist (list[str], optional, defaults to {get_default_import_allowlist()}) : AutoPeftModel will attempt to instantiate the base model that is configured in the adapter config. Since this operation needs to potentially import other packages, this allowlist is a safe-guard to prevent importing malicious packages. You may need to specify your package's import name here if it is not in the defaults.
AutoPeftModelForCausalLM[[peft.AutoPeftModelForCausalLM]]
peft.AutoPeftModelForCausalLM[[peft.AutoPeftModelForCausalLM]]
AutoPeftModelForSeq2SeqLM[[peft.AutoPeftModelForSeq2SeqLM]]
peft.AutoPeftModelForSeq2SeqLM[[peft.AutoPeftModelForSeq2SeqLM]]
AutoPeftModelForSequenceClassification[[peft.AutoPeftModelForSequenceClassification]]
peft.AutoPeftModelForSequenceClassification[[peft.AutoPeftModelForSequenceClassification]]
AutoPeftModelForTokenClassification[[peft.AutoPeftModelForTokenClassification]]
peft.AutoPeftModelForTokenClassification[[peft.AutoPeftModelForTokenClassification]]
AutoPeftModelForQuestionAnswering[[peft.AutoPeftModelForQuestionAnswering]]
peft.AutoPeftModelForQuestionAnswering[[peft.AutoPeftModelForQuestionAnswering]]
AutoPeftModelForFeatureExtraction[[peft.AutoPeftModelForFeatureExtraction]]
peft.AutoPeftModelForFeatureExtraction[[peft.AutoPeftModelForFeatureExtraction]]
Xet Storage Details
- Size:
- 3.83 kB
- Xet hash:
- 2127b4ac5783a8ea3431a32049c752f716961902355ea5b46df7517ff9fedecc
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.