From 8002d8a2f95aced3be5e49d8c9af2bc78ff97f9a Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Tue, 4 Nov 2025 09:58:40 +0200 Subject: [PATCH] This still needed for some reason too --- custom_linear.py | 2 +- gguf/gguf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_linear.py b/custom_linear.py index edd3379..e6cd2bf 100644 --- a/custom_linear.py +++ b/custom_linear.py @@ -128,7 +128,7 @@ class CustomLinear(nn.Linear): patch_diff = torch.mm( lora_diff_0.flatten(start_dim=1), lora_diff_1.flatten(start_dim=1) - ).reshape(weight.shape) + ).reshape(weight.shape) + 0 alpha = lora_diff_2 / lora_diff_1.shape[0] if lora_diff_2 is not None else 1.0 scale = lora_strength * alpha weight = weight.add(patch_diff, alpha=scale) diff --git a/gguf/gguf.py b/gguf/gguf.py index 177e1e9..76dd87e 100644 --- a/gguf/gguf.py +++ b/gguf/gguf.py @@ -151,7 +151,7 @@ class GGUFLinear(nn.Linear): patch_diff = torch.mm( lora_diff_0.flatten(start_dim=1), lora_diff_1.flatten(start_dim=1) - ).reshape(weight.shape) + ).reshape(weight.shape) + 0 alpha = lora_diff_2 / lora_diff_1.shape[0] if lora_diff_2 is not None else 1.0 scale = lora_strength * alpha weight = weight.add(patch_diff, alpha=scale)