From 44d8e72ca8d5af9a0b7ef93c773c31edbc90c2fd Mon Sep 17 00:00:00 2001 From: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com> Date: Thu, 2 Feb 2023 13:19:14 +0530 Subject: [PATCH] fixes --- src/peft/peft_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peft/peft_model.py b/src/peft/peft_model.py index ef8892a..32937ae 100644 --- a/src/peft/peft_model.py +++ b/src/peft/peft_model.py @@ -131,7 +131,7 @@ class PeftModel(PushToHubMixin, torch.nn.Module): # load the config config = PEFT_TYPE_TO_CONFIG_MAPPING[PeftConfig.from_pretrained(model_id).peft_type].from_pretrained(model_id) - if not isinstance(config, PromptLearningConfig): + if config.task_type not in MODEL_TYPE_TO_PEFT_MODEL_MAPPING.keys(): model = cls(model, config) else: model = MODEL_TYPE_TO_PEFT_MODEL_MAPPING[config.task_type](model, config)