From 2ff33fb2707735831676a5c53ccf07baff5c9a6f Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Fri, 23 Feb 2024 03:52:24 +1100 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index d9da281dea..f443b91b27 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -1399,7 +1399,7 @@ class FastLlamaModel: (down_proj.base_layer if hasattr(down_proj, "base_layer") else down_proj).bias is None: # https://stackoverflow.com/questions/50599045/python-replacing-a-function-within-a-class-of-a-module - layer.mlp.forward = types.MethodType(apply_lora_mlp, layer.mlp) + # layer.mlp.forward = types.MethodType(apply_lora_mlp, layer.mlp) n_mlp += 1 else: logger.warning_once( @@ -1419,7 +1419,7 @@ class FastLlamaModel: (k_proj.base_layer if hasattr(k_proj, "base_layer") else k_proj).bias is None and \ (v_proj.base_layer if hasattr(v_proj, "base_layer") else v_proj).bias is None: - layer.self_attn.apply_qkv = apply_lora_qkv + # layer.self_attn.apply_qkv = apply_lora_qkv n_qkv += 1 else: logger.warning_once( @@ -1433,7 +1433,7 @@ class FastLlamaModel: if hasattr(o_proj, "lora_A") and \ (o_proj.base_layer if hasattr(o_proj, "base_layer") else o_proj).bias is None: - layer.self_attn.apply_o = apply_lora_o + # layer.self_attn.apply_o = apply_lora_o n_o += 1 else: logger.warning_once(