From 665908eb70783b2cf8e558f0eb0913f66a5ca186 Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Sat, 3 Feb 2024 22:28:20 +1100 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index 99ce923d36..a2ff511992 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -221,7 +221,7 @@ pass def fast_rms_layernorm_inference(self, X, temp1 = None, temp2 = None): old_dtype = X.dtype - if XX is None: + if temp1 is None: bsz, _, hd = X.shape temp1 = torch.empty((2, bsz, 1, hd), dtype = torch.float32, device = "cuda") temp2 = torch.empty((bsz, 1, hd), dtype = old_dtype, device = "cuda") @@ -680,9 +680,9 @@ def LlamaModel_fast_forward_inference( decoder_layer.self_attn, hidden_states, past_key_values[idx], - temp_QA = temp_QA, - temp_KV = temp_KV, - RH_Q = RH_Q, + temp_QA, + temp_KV, + RH_Q, ) hidden_states += residual