From 02e94ce17a1c13410abac42dd4a6214716943bc2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 06:14:27 +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 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py index b7c340c483..5d3d7bb62c 100644 --- a/unsloth/models/loader.py +++ b/unsloth/models/loader.py @@ -293,9 +293,11 @@ class FastLanguageModel(FastLlamaModel): # AMD GPT-OSS routing: # - Radeon can often use prequantized bnb-4bit checkpoints. # - Instinct/MI (warp=64) often cannot, so fallback to BF16. - if is_hip() and ( - "gpt-oss" in model_name.lower() or "gpt_oss" in model_name.lower() - ) and not use_exact_model_name: + if ( + is_hip() + and ("gpt-oss" in model_name.lower() or "gpt_oss" in model_name.lower()) + and not use_exact_model_name + ): gpt_oss_prequant_suffix = model_name.lower().endswith( ("-unsloth-bnb-4bit", "-bnb-4bit") ) @@ -901,9 +903,11 @@ class FastModel(FastBaseModel): # AMD GPT-OSS routing: # - Radeon can often use prequantized bnb-4bit checkpoints. # - Instinct/MI (warp=64) often cannot, so fallback to BF16. - if is_hip() and ( - "gpt-oss" in model_name.lower() or "gpt_oss" in model_name.lower() - ) and not use_exact_model_name: + if ( + is_hip() + and ("gpt-oss" in model_name.lower() or "gpt_oss" in model_name.lower()) + and not use_exact_model_name + ): gpt_oss_prequant_suffix = model_name.lower().endswith( ("-unsloth-bnb-4bit", "-bnb-4bit") )