Update llama.py
This commit is contained in:
parent
a5fcf2dfc6
commit
25a7117dbe
1 changed files with 3 additions and 3 deletions
|
|
@ -1699,9 +1699,9 @@ class FastLlamaModel:
|
|||
elif dtype == torch.bfloat16 and not SUPPORTS_BFLOAT16:
|
||||
logger.warning_once("Device does not support bfloat16. Will change to float16.")
|
||||
dtype = torch.float16
|
||||
elif dtype == torch.float16 and SUPPORTS_BFLOAT16:
|
||||
logger.warning_once("Device supports bfloat16 but you selected float16. Will change to bfloat16.")
|
||||
dtype = torch.bfloat16
|
||||
# elif dtype == torch.float16 and SUPPORTS_BFLOAT16:
|
||||
# logger.warning_once("Device supports bfloat16 but you selected float16. Will change to bfloat16.")
|
||||
# dtype = torch.bfloat16
|
||||
|
||||
assert(dtype == torch.float16 or dtype == torch.bfloat16 or dtype == torch.float32)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue