From 935754dba2a2887b1ab73af5cbfd89274fa851d0 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 17 Jul 2025 02:08:49 -0700 Subject: [PATCH] Update _utils.py --- unsloth/models/_utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 9a26ad0060..bfd7c8c5a5 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -190,6 +190,14 @@ try: except: pass +# The following generation flags are not valid and may be ignored: +try: + from transformers.generation.configuration_utils import logger as configuration_logger + configuration_logger.addFilter(HideLoggingMessage("following generation flags")) + del configuration_logger +except: + pass + # Gemma3 It is strongly recommended to train Gemma3 models with the `eager` try: from transformers.models.gemma3.modeling_gemma3 import logger as gemma3_logger