From 38c0249ea9efe251e5b59411ff8aba1994b2418c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Mon, 29 May 2023 18:06:16 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20move=20ggml=20attributes?= =?UTF-8?q?=20to=20click=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nio_llm/main.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/nio_llm/main.py b/nio_llm/main.py index c5cb605..819b9fa 100644 --- a/nio_llm/main.py +++ b/nio_llm/main.py @@ -52,6 +52,20 @@ logger = logging.getLogger("nio-llm.main") help="The preprompt to use.", required=True, ) +@click.option( + "--ggml-repoid", + "-g", + help="The HuggingFace Hub repo ID to download the model from.", + default="TheBloke/stable-vicuna-13B-GGML", + show_default=True, +) +@click.option( + "--ggml-filename", + "-f", + help="The HuggingFace Hub filename to download the model from.", + default="stable-vicuna-13B.ggmlv3.q5_1.bin", + show_default=True, +) def main( *, room: str, @@ -60,6 +74,8 @@ def main( device_id: str, preprompt: str, homeserver: str, + ggml_repoid: str, + ggml_filename: str, ) -> None: """Run the main program. @@ -68,8 +84,8 @@ def main( # download the model ggml_path = Path( hf_hub_download( - repo_id="TheBloke/stable-vicuna-13B-GGML", - filename="stable-vicuna-13B.ggmlv3.q5_1.bin", + repo_id=ggml_repoid, + filename=ggml_filename, ), )