From db6d4e0fb7815437d3c2351e56a04305901b6d43 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 13 Feb 2025 17:12:06 -0800 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index 511ae5c681..04d2ee0396 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -707,8 +707,8 @@ def LlamaModel_fast_forward( # Ignore attention_mask if attention_mask is None: padding_mask = None - elif self.training: - # elif attention_mask is not None and self.training: + # elif self.training: + elif attention_mask is not None and self.training: attention_mask = None padding_mask = None else: