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,