mirror of
https://github.com/wassname/peft.git
synced 2026-10-02 12:30:46 +08:00
lot of refactoring
This commit is contained in:
1 parent
dec1c5c2eb
commit
a92a7876e0
14 files changed
+307
-814
No files matched your search
@@ -0,0 +1,17 @@
|
||||
from .pet_model import PETModelForCausalLM, PETModelForSeq2SeqLM, PETModelForSequenceClassification
|
||||
from .tuners import PrefixTuningConfig, PromptEncoderConfig, PromptTuningConfig
|
||||
from .utils import PETConfig
|
||||
|
||||
|
||||
MODEL_TYPE_TO_PROMPT_MODEL_MAPPING = {
|
||||
"SEQ_CLS": PETModelForSequenceClassification,
|
||||
"SEQ_2_SEQ_LM": PETModelForSeq2SeqLM,
|
||||
"CAUSAL_LM": PETModelForCausalLM,
|
||||
}
|
||||
|
||||
PET_TYPE_TO_CONFIG_MAPPING = {
|
||||
"PROMPT_TUNING": PromptTuningConfig,
|
||||
"PREFIX_TUNING": PrefixTuningConfig,
|
||||
"P_TUNING": PromptEncoderConfig,
|
||||
"LORA": PETConfig,
|
||||
}
|
||||
Reference in new issue
Block a user