From 18f380b17746cbb1c47524a3924c43321307f7f0 Mon Sep 17 00:00:00 2001 From: Awni Hannun Date: Sat, 4 Jan 2025 21:02:13 -0800 Subject: [PATCH] use upload_large_file instead of deprecated multi comit --- llms/mlx_lm/utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/llms/mlx_lm/utils.py b/llms/mlx_lm/utils.py index 0c35d07f..8e5d0be2 100644 --- a/llms/mlx_lm/utils.py +++ b/llms/mlx_lm/utils.py @@ -655,7 +655,7 @@ def upload_to_hub(path: str, upload_repo: str, hf_path: str): model, tokenizer = load("{upload_repo}") - prompt="hello" + prompt = "hello" if tokenizer.chat_template is not None: messages = [{{"role": "user", "content": prompt}}] @@ -673,12 +673,10 @@ def upload_to_hub(path: str, upload_repo: str, hf_path: str): api = HfApi() api.create_repo(repo_id=upload_repo, exist_ok=True) - api.upload_folder( + api.upload_large_folder( folder_path=path, repo_id=upload_repo, repo_type="model", - multi_commits=True, - multi_commits_verbose=True, ) print(f"Upload successful, go to https://huggingface.co/{upload_repo} for details.")