From e264d42413c153b7ce3cf4eec55dccfc79b2deb9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 21:55:14 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- unsloth/models/loader.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py index f92d348080..a42b7f38a7 100644 --- a/unsloth/models/loader.py +++ b/unsloth/models/loader.py @@ -1384,10 +1384,14 @@ class FastModel(FastBaseModel): global FORCE_BFLOAT16 for disable_name in FORCE_BFLOAT16: if ( - disable_name.lower() - == model_type_arch.lower().replace("-", "").replace("_", "") - or disable_name.lower() in model_types_all - ) and dtype == torch.float16 and SUPPORTS_BFLOAT16: + ( + disable_name.lower() + == model_type_arch.lower().replace("-", "").replace("_", "") + or disable_name.lower() in model_types_all + ) + and dtype == torch.float16 + and SUPPORTS_BFLOAT16 + ): logger.warning_once( f"Unsloth: {model_type_arch} does not support float16 training. " f"Switching to bfloat16."