Update llama.py

This commit is contained in:
Daniel Han 2025-01-07 01:56:32 -08:00
commit a243ddb4f0

View file

@ -1611,7 +1611,7 @@ class FastLlamaModel:
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.float16
dtype = torch.bfloat16
assert(dtype == torch.float16 or dtype == torch.bfloat16 or dtype == torch.float32)