Update vision.py
This commit is contained in:
parent
962c470ef7
commit
2b9f86bec8
1 changed files with 1 additions and 1 deletions
|
|
@ -485,7 +485,7 @@ class FastBaseModel:
|
|||
full_finetuning = os.environ.get("UNSLOTH_ENABLE_FULL_FINETUNING", "0") == "1"
|
||||
|
||||
float32_mixed_precision = True
|
||||
if _get_dtype(model.config.torch_dtype) == torch.bfloat16:
|
||||
if _get_dtype(model.config.torch_dtype) == torch.bfloat16 and full_finetuning:
|
||||
# Use bfloat16 precision for full finetuning
|
||||
float32_mixed_precision = False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue