diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index 296cbf51f5..43f2f1951c 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -664,7 +664,7 @@ def LlamaForCausalLM_fast_forward( *args, **kwargs, ) -> Union[Tuple, CausalLMOutputWithPast]: - if causal_mask is None and past_key_value is not None: + if causal_mask is None and past_key_values is not None: causal_mask = xformers.attn_bias.LowerTriangularMask() output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions