From 44d0ac3f259ae57a6a5b3dcbb8d39c68b774aff3 Mon Sep 17 00:00:00 2001 From: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com> Date: Thu, 16 Feb 2023 20:15:48 +0530 Subject: [PATCH] fix --- src/peft/tuners/lora.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peft/tuners/lora.py b/src/peft/tuners/lora.py index 079e3a2..5ff7bbc 100644 --- a/src/peft/tuners/lora.py +++ b/src/peft/tuners/lora.py @@ -134,7 +134,7 @@ class LoraModel(torch.nn.Module): is_target_modules_in_base_model = True parent, target, target_name = self._get_submodules(key) bias = target.bias is not None - if isinstance(target, bnb.nn.Linear8bitLt) and self.peft_config.enable_lora is None: + if loaded_in_8bit and isinstance(target, bnb.nn.Linear8bitLt) and self.peft_config.enable_lora is None: kwargs.update( { "has_fp16_weights": target.state.has_fp16_weights,