From 06e06f922d2a19365b2cc6e2602993c15c1104dd Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 25 Sep 2024 00:06:10 -0700 Subject: [PATCH] Update cross_entropy_loss.py --- unsloth/kernels/cross_entropy_loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/kernels/cross_entropy_loss.py b/unsloth/kernels/cross_entropy_loss.py index 72bd3b92d6..1174ead7d1 100644 --- a/unsloth/kernels/cross_entropy_loss.py +++ b/unsloth/kernels/cross_entropy_loss.py @@ -387,7 +387,7 @@ from transformers.models.llama.modeling_llama import ( Tuple, ) import inspect, re -function = inspect.getsource(transformers.models.llama.modeling_llama.LlamaForCausalLM.forward) +function = inspect.getsource(LlamaForCausalLM.forward) function = function.split("\n") i = re.match(r"[ ]{1,}", function[0]).span(0)[1] function = [x[i:] for x in function]