diff --git a/llms/mlx_lm/utils.py b/llms/mlx_lm/utils.py index 739dafd9..5f2a2f8c 100644 --- a/llms/mlx_lm/utils.py +++ b/llms/mlx_lm/utils.py @@ -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