From ebbd4756d42a9766f9e9d786056f5933796a407d Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Sat, 24 Feb 2024 17:41:53 +1100 Subject: [PATCH] Update gemma.py --- unsloth/models/gemma.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unsloth/models/gemma.py b/unsloth/models/gemma.py index f1bd54e5ec..986a4da170 100644 --- a/unsloth/models/gemma.py +++ b/unsloth/models/gemma.py @@ -208,7 +208,7 @@ def GemmaDecoderLayer_fast_forward( hidden_states = fast_rms_layernorm(self.input_layernorm, hidden_states) hidden_states, self_attn_weights, present_key_value = self.self_attn( hidden_states=hidden_states, - causal_mask=causal_mask, + # causal_mask=causal_mask, attention_mask=attention_mask, position_ids=position_ids, past_key_value=past_key_value, @@ -576,9 +576,9 @@ class FastGemmaModel(FastLlamaModel): @staticmethod def pre_patch(): - GemmaAttention .forward = GemmaAttention_fast_forward - GemmaSdpaAttention .forward = GemmaAttention_fast_forward - GemmaFlashAttention2.forward = GemmaAttention_fast_forward + # GemmaAttention .forward = GemmaAttention_fast_forward + # GemmaSdpaAttention .forward = GemmaAttention_fast_forward + # GemmaFlashAttention2.forward = GemmaAttention_fast_forward GemmaDecoderLayer .forward = GemmaDecoderLayer_fast_forward GemmaModel .forward = GemmaModel_fast_forward GemmaForCausalLM .forward = GemmaForCausalLM_fast_forward