From 8b1ebc4affde38a4cd26abda7a47e527891c89a9 Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Fri, 7 Jun 2024 04:25:33 +1000 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 ea5dabf7..1e301acc 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -791,7 +791,7 @@ def _CausalLM_fast_forward( *args, **kwargs, ) -> Union[Tuple, CausalLMOutputWithPast]: - if past_key_values is not None: + if past_key_values is not None and self.config.model_type != "qwen2": outputs = fast_forward_inference( self, input_ids,