From e791db9b06f4aa848741e09d1f1e7b69abca9288 Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Thu, 1 Feb 2024 20:12:59 +1100 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index c92dc78bdc..44de7bf391 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -225,7 +225,7 @@ def LlamaAttention_fast_forward_inference( Xn = hidden_states bsz, _, hd = hidden_states.size() K1, V1 = past_key_value - dtype = X.dtype + dtype = Xn.dtype n_heads = self.num_heads n_groups = self.num_key_value_groups