chore: add model-path param flag for convert API for better clarity (#702)
* chore: add model-path param flag for convert API for better clarity Signed-off-by: Jake Hall <jaycoolslm@gmail.com> * chore: refactor argparse for multiple string options Signed-off-by: Jake Hall <jaycoolslm@gmail.com> * Update mlx_lm/convert.py * Update README.md --------- Signed-off-by: Jake Hall <jaycoolslm@gmail.com> Co-authored-by: Awni Hannun <awni.hannun@gmail.com>
This commit is contained in:
@@ -170,7 +170,7 @@ mlx_lm.generate --help
|
||||
To quantize a model from the command line run:
|
||||
|
||||
```
|
||||
mlx_lm.convert --hf-path mistralai/Mistral-7B-Instruct-v0.3 -q
|
||||
mlx_lm.convert --model mistralai/Mistral-7B-Instruct-v0.3 -q
|
||||
```
|
||||
|
||||
For more options run:
|
||||
@@ -185,7 +185,7 @@ You can upload new models to Hugging Face by specifying `--upload-repo` to
|
||||
|
||||
```
|
||||
mlx_lm.convert \
|
||||
--hf-path mistralai/Mistral-7B-Instruct-v0.3 \
|
||||
--model mistralai/Mistral-7B-Instruct-v0.3 \
|
||||
-q \
|
||||
--upload-repo mlx-community/my-4bit-mistral
|
||||
```
|
||||
|
||||
+6
-1
@@ -179,7 +179,12 @@ def configure_parser() -> argparse.ArgumentParser:
|
||||
description="Convert Hugging Face model to MLX format"
|
||||
)
|
||||
|
||||
parser.add_argument("--hf-path", type=str, help="Path to the Hugging Face model.")
|
||||
parser.add_argument(
|
||||
"--hf-path",
|
||||
"--model",
|
||||
type=str,
|
||||
help="Path to the model. This can be a local path or a Hugging Face Hub model identifier.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--mlx-path", type=str, default="mlx_model", help="Path to save the MLX model."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user