mirror of
https://github.com/wassname/peft.git
synced 2026-09-09 11:28:32 +08:00
😅
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user