Fix upload to hub for HF LLMs conversion script. (#221)

* Fix upload to hub snippet.

* Weights -> model.

* reverting last commit.
This commit is contained in:
Vaibhav Srivastav 2024-01-04 19:36:05 +05:30 committed by GitHub
parent a5d6d0436c
commit f95cf30a31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)