From 4bc009df1ac97baf6e9dc0c40c3ff33b7494869b Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 11 Feb 2025 23:10:11 -0800 Subject: [PATCH] Update _utils.py --- unsloth/models/_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 2ec4adaa11..6aa7f94cf4 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -131,6 +131,7 @@ logging.getLogger("transformers.tokenization_utils_base").setLevel(logging.CRITI # Ignore logging messages class HideLoggingMessage(logging.Filter): + __slots__ = "text", def __init__(self, text): self.text = text def filter(self, x): return not (self.text in x.getMessage()) pass @@ -138,6 +139,8 @@ pass # The speedups for torchdynamo mostly come wih GPU Ampere or higher and which is not detected here. from transformers.training_args import logger as transformers_training_args_logger transformers_training_args_logger.addFilter(HideLoggingMessage("The speedups")) +# torch.distributed process group is initialized, but parallel_mode != ParallelMode.DISTRIBUTED. +transformers_training_args_logger.addFilter(HideLoggingMessage("torch.distributed")) del transformers_training_args_logger # Using the default loss: `ForCausalLMLoss`.