mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-26 18:51:18 +08:00
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:
parent
a5d6d0436c
commit
f95cf30a31
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user