From a2faeabb2675c18086b388bb87be777a8efecf55 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 20 Dec 2024 02:50:23 -0800 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index 26b9e07a27..58b572d9b8 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -1055,7 +1055,10 @@ def CausalLM_fast_forward(fast_forward_inference): self.extra_ignored_labels = torch.full((self.max_seq_length, 1), -100, device = "cuda:0") pass - print(kwargs.get("num_items_in_batch", None) or kwargs.get("n_items", None)) + print(locals()) + print(args) + print(kwargs) + raise shift_labels = torch.hstack((labels[..., 1:], self.extra_ignored_labels[:labels.shape[0]])) loss = fast_cross_entropy_loss( logits = shift_logits,