From 01c21c8a2f3cc0354672a26b1888f437edaf3e73 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 19 Sep 2025 01:17:36 -0700 Subject: [PATCH] Update _utils.py --- unsloth/models/_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 79134005dc..60abcea702 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -339,7 +339,9 @@ class _RaiseUninitialized(logging.Handler): record_lower = str(record).lower() if ("some weights of" in record_lower) and \ ("score.weight" not in record_lower) and \ - ("classifier.weight" not in record_lower): + ("classifier.weight" not in record_lower) and \ + ("cls.predictions" not in record_lower) and \ + ("predictions.decoder" not in record_lower): raise Exception( f"Unsloth: Critical error since some weights are not initialized.\n"\ f"Please try updating Unsloth, transformers and timm via:\n"\