♻️ move ggml attributes to click options

This commit is contained in:
Laureηt 2023-05-29 18:06:16 +02:00
parent 012d6e0eaf
commit 38c0249ea9
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI

View file

@ -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,
),
)