Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Logging cleanup (#5973)
Daniel Han5777ccd03e58
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.pyindex abb6969a7e3..138a7b3cc04 100644--- a/unsloth/models/_utils.py+++ b/unsloth/models/_utils.py@@ -782,6 +782,22 @@ transformers_trainer_logger.addFilter(HideLoggingMessage("No label_names"))transformers_trainer_logger.addFilter(HideLoggingMessage("The tokenizer has new"))del transformers_trainer_logger+# Strip the "[transformers] " prefix transformers>=5 adds; keep the messages.+try:+ try:+ import transformers.utils.logging as _tf_log++ _tf_log._configure_library_root_logger()+ except Exception:+ pass+ _tf_root = logging.getLogger("transformers")+ _tf_fmt = logging.Formatter("%(message)s")+ for _h in list(_tf_root.handlers):+ _h.setFormatter(_tf_fmt)+ del _tf_root, _tf_fmt+except Exception:+ pass+# Using the default loss: `ForCausalLMLoss`.try:from transformers.modeling_utils import logger as transformers_modeling_utils_logger