From a243ddb4f0cd05d68673e869da359e74525c69f8 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 7 Jan 2025 01:56:32 -0800 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index 16dcd587a3..ba98bec8b2 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -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)