[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-02-11 12:14:54 +00:00
commit cee01cb7ae
3 changed files with 8 additions and 3 deletions

View file

@ -203,15 +203,18 @@ if DEVICE_TYPE == "cuda":
del major_version, minor_version
elif DEVICE_TYPE == "hip":
SUPPORTS_BFLOAT16 = torch.cuda.is_bf16_supported()
def is_bf16_supported():
return SUPPORTS_BFLOAT16
elif DEVICE_TYPE == "xpu":
# torch.xpu.is_bf16_supported() does not have including_emulation
# set SUPPORTS_BFLOAT16 as torch.xpu.is_bf16_supported()
SUPPORTS_BFLOAT16 = torch.xpu.is_bf16_supported()
def is_bf16_supported():
return SUPPORTS_BFLOAT16
# For Gradio HF Spaces?
# if "SPACE_AUTHOR_NAME" not in os.environ and "SPACE_REPO_NAME" not in os.environ:
import triton

View file

@ -783,7 +783,10 @@ class FastBaseModel:
**kwargs,
)
try:
from unsloth_zoo.temporary_patches.misc import patch_deepseek_ocr_masked_scatter
from unsloth_zoo.temporary_patches.misc import (
patch_deepseek_ocr_masked_scatter,
)
patch_deepseek_ocr_masked_scatter()
except Exception:
pass

View file

@ -1998,8 +1998,7 @@ def unsloth_save_pretrained_gguf(
except Exception as e:
if os.environ.get("UNSLOTH_GGUF_OFFLINE", "0") == "1":
print(
"Unsloth: GGUF conversion skipped due to offline mode. "
f"Reason: {e}"
"Unsloth: GGUF conversion skipped due to offline mode. " f"Reason: {e}"
)
all_file_locations = []
want_full_precision = None