[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-07-06 10:31:34 +00:00
commit 4f6aa1a3d4

View file

@ -374,7 +374,12 @@ def _enable_fp16_accumulation(
process-wide flag to its prior value on unload."""
import os
if os.environ.get("UNSLOTH_DISABLE_FP16_ACCUM", "").strip().lower() in ("1", "true", "yes", "on"):
if os.environ.get("UNSLOTH_DISABLE_FP16_ACCUM", "").strip().lower() in (
"1",
"true",
"yes",
"on",
):
return False
name = str(getattr(family, "name", family or "")).lower()
if name in _FP16_ACCUM_DENY: