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 loader_utils.py

Daniel Han3d099a3bb65d
diff --git a/unsloth/models/loader_utils.py b/unsloth/models/loader_utils.py
index f5504be2c8c..e4f5bca636b 100644
--- a/unsloth/models/loader_utils.py
+++ b/unsloth/models/loader_utils.py
@@ -262,11 +262,14 @@ def _check_load_in_fp8_settings(
# Check if torchao has this PR: https://github.com/pytorch/ao/pull/3158,
# which will be released in 0.15.0.
- error_message = "Unsloth: `load_in_fp8` requires torchao 0.15.0+ (or nightly)"
if importlib.util.find_spec("torchao") is None:
- raise ValueError(error_message)
+ raise ValueError("Unsloth: Please install torchao for on the fly float8 to work!")
import torchao
+ error_message = \
+ "Unsloth: `load_in_fp8` requires torchao 0.15.0+ (or nightly).\n"\
+ f"You have torchao version={torchao.__version__}\n"\
+ "Use `pip install --upgrade --force-reinstall torchao`"
if Version(torchao.__version__) < Version("0.15.0"):
raise ValueError(error_message)