diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 6a96e8d1f5..0044c7e761 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -1243,6 +1243,7 @@ for j, function in enumerate(functions): 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: