Update vision.py
This commit is contained in:
parent
2d3ff4918b
commit
7c73c6d3d4
1 changed files with 1 additions and 1 deletions
|
|
@ -176,7 +176,7 @@ def unsloth_base_fast_generate(
|
|||
|
||||
# Mixed precision autocast
|
||||
if os.environ.get("UNSLOTH_FORCE_FLOAT32", "0") == "1":
|
||||
autocaster = torch.autocast(device_type = "cuda", dtype = dtype)
|
||||
autocaster = torch.autocast(device_type = "cuda", dtype = torch.float16)
|
||||
else:
|
||||
autocaster = torch.autocast(device_type = "cuda", dtype = dtype)
|
||||
with torch.inference_mode(), autocaster:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue