From 45feffde6fded824b3246caff7bdf2d3ad8bbb73 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 15 Mar 2026 11:42:52 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- unsloth/models/_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 550fdf0ea6..b529ba0dd8 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -239,6 +239,7 @@ def prefer_flex_attn_if_supported(model_class, config): # instead, but sdpa_dense_backward has a dtype mismatch under fp16 # autocast (Half @ Float matmul). Skip flex_attention there. import torch + if torch.cuda.is_available(): major, _ = torch.cuda.get_device_capability() if major < 8: