From 43b6522af2bbb7042606c9a4ce3045490459ba5b Mon Sep 17 00:00:00 2001 From: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:28:57 +0100 Subject: [PATCH] rename --model_path to --model-path (#151) use same argument convention for mistral/mixtral as for llama convert. --- llms/mistral/convert.py | 2 +- llms/mistral/mistral.py | 2 +- llms/mixtral/README.md | 4 ++-- llms/mixtral/convert.py | 2 +- llms/mixtral/mixtral.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/llms/mistral/convert.py b/llms/mistral/convert.py index 2d2c7f2e..792731db 100644 --- a/llms/mistral/convert.py +++ b/llms/mistral/convert.py @@ -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.", diff --git a/llms/mistral/mistral.py b/llms/mistral/mistral.py index f35f4b90..44d3fe91 100644 --- a/llms/mistral/mistral.py +++ b/llms/mistral/mistral.py @@ -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", diff --git a/llms/mixtral/README.md b/llms/mixtral/README.md index 9194979e..858711dd 100644 --- a/llms/mixtral/README.md +++ b/llms/mixtral/README.md @@ -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: diff --git a/llms/mixtral/convert.py b/llms/mixtral/convert.py index 6ea40040..3069cf5a 100644 --- a/llms/mixtral/convert.py +++ b/llms/mixtral/convert.py @@ -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.", diff --git a/llms/mixtral/mixtral.py b/llms/mixtral/mixtral.py index 57b7c5d2..fc6c95e7 100644 --- a/llms/mixtral/mixtral.py +++ b/llms/mixtral/mixtral.py @@ -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",