Skip to content

Commit 21867b7

Browse files
committed
Update vision.py
1 parent e72a79a commit 21867b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unsloth/models/vision.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ def post_patch_model(
485485
full_finetuning = os.environ.get("UNSLOTH_ENABLE_FULL_FINETUNING", "0") == "1"
486486

487487
float32_mixed_precision = True
488-
if _get_dtype(model.config.torch_dtype) == torch.bfloat16:
488+
if _get_dtype(model.config.torch_dtype) == torch.bfloat16 and full_finetuning:
489489
# Use bfloat16 precision for full finetuning
490490
float32_mixed_precision = False
491491

0 commit comments

Comments
 (0)