This commit is contained in:
Sourab Mangrulkar
2023-04-05 01:30:07 +05:30
parent dbdb8f3757
commit 6f1f26f426
+1 -1
View File
@@ -319,7 +319,7 @@ class LoraModel(torch.nn.Module):
key_list = [key for key, _ in self.model.named_modules() if "lora" not in key]
for key in key_list:
parent, target, target_name = _get_submodules(key)
parent, target, target_name = _get_submodules(self.model, key)
if isinstance(target, LoraLayer):
bias = target.bias is not None
new_module = torch.nn.Linear(target.in_features, target.out_features, bias=bias)