mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-24 09:21:18 +08:00
rename --model_path to --model-path (#151)
use same argument convention for mistral/mixtral as for llama convert.
This commit is contained in:
parent
3efb1cc2cc
commit
43b6522af2
@ -10,7 +10,7 @@ import torch
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Convert Mistral weights to MLX.")
|
||||
parser.add_argument(
|
||||
"--model_path",
|
||||
"--model-path",
|
||||
type=str,
|
||||
default="mistral-7B-v0.1/",
|
||||
help="The path to the Mistral model. The MLX weights will also be saved there.",
|
||||
|
@ -225,7 +225,7 @@ def generate(prompt: mx.array, model: Mistral, temp: Optional[float] = 0.0):
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Mistral inference script")
|
||||
parser.add_argument(
|
||||
"--model_path",
|
||||
"--model-path",
|
||||
type=str,
|
||||
default="mistral-7B-v0.1",
|
||||
help="The path to the model weights and tokenizer",
|
||||
|
@ -43,7 +43,7 @@ Now from `mlx-exmaples/mixtral` convert and save the weights as NumPy arrays so
|
||||
MLX can read them:
|
||||
|
||||
```
|
||||
python convert.py --model_path $MIXTRAL_MODEL/
|
||||
python convert.py --model-path $MIXTRAL_MODEL/
|
||||
```
|
||||
|
||||
The conversion script will save the converted weights in the same location.
|
||||
@ -53,7 +53,7 @@ The conversion script will save the converted weights in the same location.
|
||||
As easy as:
|
||||
|
||||
```
|
||||
python mixtral.py --model_path $MIXTRAL_MODEL/
|
||||
python mixtral.py --model-path $MIXTRAL_MODEL/
|
||||
```
|
||||
|
||||
For more options including how to prompt the model, run:
|
||||
|
@ -34,7 +34,7 @@ def convert(k, v, config):
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Convert Mixtral weights to MLX.")
|
||||
parser.add_argument(
|
||||
"--model_path",
|
||||
"--model-path",
|
||||
type=str,
|
||||
default="Mixtral-8x7B-v0.1/",
|
||||
help="The path to the Mixtral model. The MLX model weights will also be saved there.",
|
||||
|
@ -282,7 +282,7 @@ def generate(prompt: mx.array, model: Mixtral, temp: Optional[float] = 0.0):
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Mixtral inference script")
|
||||
parser.add_argument(
|
||||
"--model_path",
|
||||
"--model-path",
|
||||
type=str,
|
||||
default="Mixtral-8x7B-v0.1",
|
||||
help="The path to the model weights, tokenizer, and config",
|
||||
|
Loading…
Reference in New Issue
Block a user