From 25a7117dbe2ae99a399d9df2c9caf561e38838e7 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 17 Feb 2025 19:16:41 -0800 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index 378431ec52..f34968c3a6 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -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)