Update model card uploaded with converted models (#309)

This commit is contained in:
Pedro Cuenca 2024-01-12 22:03:52 +01:00 committed by GitHub
parent 1fa40067fe
commit ef93979973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,11 +149,16 @@ def upload_to_hub(path: str, upload_repo: str, hf_path: str):
This model was converted to MLX format from [`{hf_path}`](). This model was converted to MLX format from [`{hf_path}`]().
Refer to the [original model card](https://huggingface.co/{hf_path}) for more details on the model. Refer to the [original model card](https://huggingface.co/{hf_path}) for more details on the model.
## Use with mlx ## Use with mlx
```bash ```bash
pip install mlx pip install mlx-lm
git clone https://github.com/ml-explore/mlx-examples.git ```
cd mlx-examples/llms/hf_llm
python generate.py --model {upload_repo} --prompt "My name is" ```python
from mlx_lm import load, generate
model, tokenizer = load("{upload_repo}")
response = generate(model, tokenizer, prompt="hello", verbose=True)
``` ```
""" """
card.save(os.path.join(path, "README.md")) card.save(os.path.join(path, "README.md"))