mirror of
https://github.com/wassname/peft.git
synced 2026-09-09 11:28:32 +08:00
first draft of api docs
This commit is contained in:
@@ -19,4 +19,5 @@
|
||||
- local: package_reference/config
|
||||
title: Configuration
|
||||
- local: package_reference/tuners
|
||||
title: Tuners
|
||||
title: Tuners
|
||||
|
||||
|
||||
@@ -1 +1,18 @@
|
||||
# Configuration
|
||||
# Configuration
|
||||
|
||||
The configuration classes stores the configuration of a [`PeftModel`], PEFT adapter models, and the configurations of [`PrefixTuning`], [`PromptTuning`], and [`PromptEncoder`]. They contain methods for saving and loading model configurations from the Hub, specifying the PEFT method to use, type of task to perform, and model configurations like number of layers and number of attention heads.
|
||||
|
||||
## PeftConfigMixin
|
||||
|
||||
[[autodoc]] PeftConfigMixin
|
||||
- all
|
||||
|
||||
## PeftConfig
|
||||
|
||||
[[autodoc]] PeftConfig
|
||||
- all
|
||||
|
||||
## PromptLearningConfig
|
||||
|
||||
[[autodoc]] PromptLearningConfig
|
||||
- all
|
||||
|
||||
@@ -1 +1,36 @@
|
||||
# PEFT model
|
||||
## Models
|
||||
|
||||
[`PeftModel`] is the base model class for specifying the base Transformer model and configuration to apply a PEFT method to. The base `PeftModel` contains methods for loading and saving models from the Hub, and supports the [`PromptEncoder`] for prompt learning.
|
||||
|
||||
## PeftModel
|
||||
|
||||
[[autodoc]] PeftModel
|
||||
- all
|
||||
|
||||
## PeftModelForSequenceClassification
|
||||
|
||||
A `PeftModel` for sequence classification tasks.
|
||||
|
||||
[[autodoc]] PeftModelForSequenceClassification
|
||||
- all
|
||||
|
||||
## PeftModelForTokenClassification
|
||||
|
||||
A `PeftModel` for token classification tasks.
|
||||
|
||||
[[autodoc]] PeftModelForTokenClassification
|
||||
- all
|
||||
|
||||
## PeftModelForCausalLM
|
||||
|
||||
A `PeftModel` for causal language modeling.
|
||||
|
||||
[[autodoc]] PeftModelForCausalLM
|
||||
- all
|
||||
|
||||
## PeftModelForSeq2SeqLM
|
||||
|
||||
A `PeftModel` for sequence-to-sequence language modeling.
|
||||
|
||||
[[autodoc]] PeftModelForSeq2SeqLM
|
||||
- all
|
||||
|
||||
@@ -1 +1,35 @@
|
||||
# Tuners
|
||||
# Tuners
|
||||
|
||||
Each tuner (or PEFT method) has a configuration and model.
|
||||
|
||||
## LoRA
|
||||
|
||||
For finetuning a model with LoRA.
|
||||
|
||||
[[autodoc]] LoraConfig
|
||||
|
||||
[[autodoc]] LoraModel
|
||||
|
||||
[[autodoc]] LoraLayer
|
||||
|
||||
[[autodoc]] Linear
|
||||
|
||||
[[autodoc]] MergedLinear
|
||||
|
||||
## P-tuning
|
||||
|
||||
[[autodoc]] PromptEncoderConfig
|
||||
|
||||
[[autodoc]] PromptEncoder
|
||||
|
||||
## Prefix tuning
|
||||
|
||||
[[autodoc]] PrefixTuningConfig
|
||||
|
||||
[[autodoc]] PrefixEncoder
|
||||
|
||||
## Prompt tuning
|
||||
|
||||
[[autodoc]] PromptTuningConfig
|
||||
|
||||
[[autodoc]] PromptEmbedding
|
||||
|
||||
Reference in New Issue
Block a user