From 274b0e9ded60bc7f271b3452acd9cbc966488d21 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 3 Sep 2025 20:00:21 -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 8c399f378e..981ff81577 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -317,6 +317,14 @@ try: except: pass +# Environment variable `HF_TOKEN` is set +try: + from huggingface_hub._login.utils import logger as huggingface_hub_logger + huggingface_hub_logger.addFilter(HideLoggingMessage("`HF_TOKEN`")) + del huggingface_hub_logger +except: + pass + # Errors out on # Some weights of Gemma3nForConditionalGeneration were not initialized from the model checkpoint from transformers.modeling_utils import logger as transformers_logger