From 9f2f2387ac3f9fe1feb714f0de1f05ed7b3cf1ed Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 9 Jul 2025 16:30:57 -0700 Subject: [PATCH] Update __init__.py --- unsloth/__init__.py | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/unsloth/__init__.py b/unsloth/__init__.py index f3fef871b6..a1a39fd192 100644 --- a/unsloth/__init__.py +++ b/unsloth/__init__.py @@ -50,20 +50,6 @@ os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python" # "pinned_use_cuda_host_register:True,"\ # "pinned_num_register_threads:8" -# Hugging Face Hub faster downloads -if "HF_HUB_ENABLE_HF_TRANSFER" not in os.environ: - os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1" -pass - -# Disable XET Cache for now -os.environ["HF_XET_HIGH_PERFORMANCE"] = "1" -os.environ["HF_XET_CHUNK_CACHE_SIZE_BYTES"] = "0" -os.environ["HF_XET_RECONSTRUCT_WRITE_SEQUENTIALLY"] = "0" -os.environ["HF_XET_NUM_CONCURRENT_RANGE_GETS"] = "64" -# More verbose HF Hub info -if os.environ.get("UNSLOTH_ENABLE_LOGGING", "0") == "1": - os.environ["HF_HUB_VERBOSITY"] = "info" - # Log Unsloth is being used os.environ["UNSLOTH_IS_PRESENT"] = "1" @@ -225,12 +211,11 @@ elif DEVICE_TYPE == "xpu": # Check for unsloth_zoo try: unsloth_zoo_version = importlib_version("unsloth_zoo") - if Version(unsloth_zoo_version) < Version("2025.4.1"): - pass - # print( - # "Unsloth: Updating Unsloth-Zoo utilies to the latest version.\n"\ - # "To disable this, set `os.environ['UNSLOTH_DISABLE_AUTO_UPDATES'] = '1'`" - # ) + if Version(unsloth_zoo_version) < Version("2025.7.1"): + print( + "Unsloth: Please update Unsloth and Unsloth-Zoo to the latest version!\n"\ + "Do this via `pip install --upgrade --force-reinstall --no-cache-dir --no-deps unsloth unsloth_zoo`" + ) # if os.environ.get("UNSLOTH_DISABLE_AUTO_UPDATES", "0") == "0": # try: # os.system("pip install --upgrade --no-cache-dir --no-deps unsloth_zoo")