From ddb48efd33fd316fe30c2a946ee5e25858992aa7 Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Sun, 28 Jan 2024 16:43:10 +1100 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 1 + 1 file changed, 1 insertion(+) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index bead05101a..f2a86fde28 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -520,6 +520,7 @@ def LlamaModel_fast_forward( # Fix up attention mask by setting elements to 0 # Specifically for DPO + print(self._has_no_labels, attention_mask) if self._has_no_labels and attention_mask is not None: inputs_requires_grad = hidden_states.requires_grad if inputs_requires_grad: hidden_states.requires_grad_(False)