Update loader.py
This commit is contained in:
parent
c9b5d5cea3
commit
a8ddc39482
1 changed files with 4 additions and 4 deletions
|
|
@ -54,11 +54,11 @@ def _get_dtype(dtype):
|
|||
"bfloat16": torch.bfloat16,
|
||||
torch.bfloat16: torch.bfloat16,
|
||||
}
|
||||
if dtype in __DTYPE_MAP:
|
||||
return __DTYPE_MAP[dtype]
|
||||
if dtype is None or dtype == None: return None
|
||||
if dtype in __DTYPE_MAP: return __DTYPE_MAP[dtype]
|
||||
else:
|
||||
print(f"Unsloth: {dtype} is not recognized, so we'll default to torch.float16")
|
||||
return torch.float16
|
||||
print(f"Unsloth: {dtype} is not recognized, so we'll default to None")
|
||||
return None
|
||||
pass
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue