From df8034d185255c2b6286a4fb44bcb8e8388ad302 Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Sun, 25 Feb 2024 04:48:34 +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 2e5a7d83a2..f552cb473f 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -283,7 +283,7 @@ def LlamaAttention_fast_forward( if position_ids is None: cos = self.rotary_emb.cos_cached sin = self.rotary_emb.sin_cached - if cos in None: + if cos is None: # Need to call rotary_emb to init it cos, sin = self.rotary_emb(V, position_ids, seq_len = kv_seq_len) pass