From 75131959d1d5b9c00acd7a59aefcc196b54d5ef9 Mon Sep 17 00:00:00 2001 From: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com> Date: Wed, 5 Apr 2023 02:03:31 +0530 Subject: [PATCH] =?UTF-8?q?fix=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 1c3e7e1..fbe98e4 100644 --- a/src/peft/peft_model.py +++ b/src/peft/peft_model.py @@ -352,7 +352,7 @@ class PeftModel(PushToHubMixin, torch.nn.Module): if ( (getattr(self, "hf_device_map", None) is not None) and (len(set(self.hf_device_map.values()).intersection({"cpu", "disk"})) > 0) - and len(self.peft_config == 1) + and len(self.peft_config) == 1 ): device_map = kwargs.get("device_map", "auto") max_memory = kwargs.get("max_memory", None)