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