From 36b400e59895dd56e028c161890378bd8874e503 Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Sun, 4 Feb 2024 03:08:49 +1100 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index c1bf8cec03..57f8a42aec 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -767,7 +767,7 @@ class FastLlamaModel: @staticmethod def pre_patch(): - LlamaAttention .forward = LlamaAttention_fast_forward + # LlamaAttention .forward = LlamaAttention_fast_forward LlamaSdpaAttention .forward = LlamaAttention_fast_forward LlamaFlashAttention2.forward = LlamaAttention_fast_forward LlamaDecoderLayer .forward = LlamaDecoderLayer_fast_forward @@ -801,7 +801,7 @@ class FastLlamaModel: f"\ / Bfloat16 = {str(SUPPORTS_BFLOAT16).upper()}. Xformers = {xformers_version}. FA = {HAS_FLASH_ATTENTION}.\n"\ f' "-____-" Free Apache license: http://github.com/unslothai/unsloth' print(statistics) - # FastLlamaModel.pre_patch() + FastLlamaModel.pre_patch() if dtype is None: dtype = torch.float16 if not SUPPORTS_BFLOAT16 else torch.bfloat16