From 0e1b154d028df9f221c024f944670b795cb1de5f Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 25 Nov 2024 21:57:56 -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 5326c09b52..a50c8be2bb 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -1176,7 +1176,7 @@ LOGITS_ERROR_STRING = \ "... trainer.train() ..." def raise_logits_error(*args, **kwargs): raise NotImplementedError(LOGITS_ERROR_STRING) -class EmptyLogits(torch.Tensor): +class EmptyLogits: def __init__(self): return __getitem__ = raise_logits_error __getattr__ = raise_logits_error