diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index ab53811f49..02a3cbb46f 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -1242,6 +1242,7 @@ def __str__ (self): return LOGITS_ERROR_STRING except: continue pass +import importlib USE_MODELSCOPE = os.environ.get("UNSLOTH_USE_MODELSCOPE", "0") == "1" if USE_MODELSCOPE: if importlib.util.find_spec("modelscope") is None: