From 23716bfb80901b2d46987472236e39cd1eb39f9b Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 25 Nov 2024 22:32:27 -0800 Subject: [PATCH] Update _utils.py --- unsloth/models/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 4daac6c4b4..5024204f20 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -1186,7 +1186,7 @@ class EmptyLogits: pass EMPTY_LOGITS = EmptyLogits() functions = dir(torch.Tensor) -for function in functions: +for j, function in enumerate(functions): if function.endswith("_") and len(function) > 2 and function[-2] != "_": print() try: exec(f"EMPTY_LOGITS.{function} = warn_logits_error", globals(), locals())