From 9009ef0bc34fa277f54a91c3d69e910ae5e7de4c Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 5 Mar 2025 23:48:00 -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 36f44b4e4d..0f531dbadc 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -1253,7 +1253,7 @@ LOGITS_ERROR_STRING = \ def raise_logits_error(*args, **kwargs): raise NotImplementedError(LOGITS_ERROR_STRING) def return_none(*args, **kwargs): return None -class EmptyLogits(list): +class EmptyLogits: def __init__(self): return def raise_getattr_error(self, attr): return return_none if attr == "to" else raise_logits_error __getitem__ = raise_logits_error