mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-24 17:31:18 +08:00
Add mlx-lm version information to HF model card (#596)
* Add mlx-lm version informatiohn to HF model card * Update llms/mlx_lm/utils.py Co-authored-by: Awni Hannun <awni.hannun@gmail.com> * Reverted indentation * Pre-commit formatting --------- Co-authored-by: Awni Hannun <awni.hannun@gmail.com>
This commit is contained in:
parent
39d5ca6427
commit
6f2fd5daea
@ -440,12 +440,14 @@ def upload_to_hub(path: str, upload_repo: str, hf_path: str):
|
||||
|
||||
from huggingface_hub import HfApi, ModelCard, logging
|
||||
|
||||
from . import __version__
|
||||
|
||||
card = ModelCard.load(hf_path)
|
||||
card.data.tags = ["mlx"] if card.data.tags is None else card.data.tags + ["mlx"]
|
||||
card.text = dedent(
|
||||
f"""
|
||||
# {upload_repo}
|
||||
This model was converted to MLX format from [`{hf_path}`]().
|
||||
This model was converted to MLX format from [`{hf_path}`]() using mlx-lm version **{__version__}**.
|
||||
Refer to the [original model card](https://huggingface.co/{hf_path}) for more details on the model.
|
||||
## Use with mlx
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user