Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Update llama.py

Daniel Hana4aba47ebb1d
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py
index 16dcd587a30..ba98bec8b27 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)