mirror of
https://github.com/Laurent2916/nio-llm.git
synced 2024-11-21 21:58:50 +00:00
♻️ move ggml attributes to click options
This commit is contained in:
parent
012d6e0eaf
commit
38c0249ea9
|
@ -52,6 +52,20 @@ logger = logging.getLogger("nio-llm.main")
|
||||||
help="The preprompt to use.",
|
help="The preprompt to use.",
|
||||||
required=True,
|
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(
|
def main(
|
||||||
*,
|
*,
|
||||||
room: str,
|
room: str,
|
||||||
|
@ -60,6 +74,8 @@ def main(
|
||||||
device_id: str,
|
device_id: str,
|
||||||
preprompt: str,
|
preprompt: str,
|
||||||
homeserver: str,
|
homeserver: str,
|
||||||
|
ggml_repoid: str,
|
||||||
|
ggml_filename: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Run the main program.
|
"""Run the main program.
|
||||||
|
|
||||||
|
@ -68,8 +84,8 @@ def main(
|
||||||
# download the model
|
# download the model
|
||||||
ggml_path = Path(
|
ggml_path = Path(
|
||||||
hf_hub_download(
|
hf_hub_download(
|
||||||
repo_id="TheBloke/stable-vicuna-13B-GGML",
|
repo_id=ggml_repoid,
|
||||||
filename="stable-vicuna-13B.ggmlv3.q5_1.bin",
|
filename=ggml_filename,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue