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

Daniel Han0ebecb759a88
diff --git a/unsloth/__init__.py b/unsloth/__init__.py
index 91ec460094d..5102d8f466c 100644
--- a/unsloth/__init__.py
+++ b/unsloth/__init__.py
@@ -53,12 +53,14 @@ pass
# Reduce VRAM usage by reducing fragmentation
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"
-# Hugging Face Hub faster downloads (only enable during Colab and Kaggle sessions)
-keynames = "\n" + "\n".join(os.environ.keys())
-if "\nCOLAB_" in keynames or "\nKAGGLE_" in keynames:
+# Hugging Face Hub faster downloads
+if "HF_HUB_ENABLE_HF_TRANSFER" not in os.environ:
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
pass
+# Log Unsloth is being used
+os.environ["UNSLOTH_IS_PRESENT"] = "1"
+
try:
import torch
except ModuleNotFoundError: