diff --git a/unsloth/save.py b/unsloth/save.py index beb7c0890d..0ea40480d8 100644 --- a/unsloth/save.py +++ b/unsloth/save.py @@ -842,7 +842,7 @@ def upload_to_huggingface(model, save_directory, token, method, extra = "", file if "/" not in save_directory: from huggingface_hub import whoami try: - username = whoami()['name'] + username = whoami(token = token)['name'] if type(old_username) is str and username != old_username: username = old_username pass