From f95cf30a313200c08d9442dbf47eaf5857c05664 Mon Sep 17 00:00:00 2001 From: Vaibhav Srivastav Date: Thu, 4 Jan 2024 19:36:05 +0530 Subject: [PATCH] Fix upload to hub for HF LLMs conversion script. (#221) * Fix upload to hub snippet. * Weights -> model. * reverting last commit. --- llms/hf_llm/convert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llms/hf_llm/convert.py b/llms/hf_llm/convert.py index 2bc48fe2..0704b24b 100644 --- a/llms/hf_llm/convert.py +++ b/llms/hf_llm/convert.py @@ -69,7 +69,7 @@ def make_shards(weights: dict, max_file_size_gibibyte: int = 15): return shards -def upload_to_hub(path: str, name: str): +def upload_to_hub(path: str, name: str, hf_path: str): import os from huggingface_hub import HfApi, ModelCard, logging @@ -171,4 +171,4 @@ if __name__ == "__main__": json.dump(config, fid, indent=4) if args.upload_name is not None: - upload_to_hub(mlx_path, args.upload_name) + upload_to_hub(mlx_path, args.upload_name, args.hf_path)