first draft of api docs

This commit is contained in:
Steven
2023-03-31 13:41:33 -07:00
committed by Steven Liu
parent 165ee0b5ff
commit 39fb96316f
4 changed files with 91 additions and 4 deletions
+2 -1
View File
@@ -19,4 +19,5 @@
- local: package_reference/config
title: Configuration
- local: package_reference/tuners
title: Tuners
title: Tuners
+18 -1
View File
@@ -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
+36 -1
View File
@@ -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
+35 -1
View File
@@ -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