diff --git a/gguf/gguf.py b/gguf/gguf.py index 41f37bd..fa24023 100644 --- a/gguf/gguf.py +++ b/gguf/gguf.py @@ -121,6 +121,9 @@ class GGUFLinear(nn.Linear): continue elif lora_strength == 0.0: continue + if len(lora_diff) == 1: + weight = weight.add(lora_diff[0].to(weight.device), alpha=lora_strength) + continue patch_diff = torch.mm( lora_diff[0].flatten(start_dim=1).to(weight.device), lora_diff[1].flatten(start_dim=1).to(weight.device)