From a40a0d8fc8f2de27952dfc35c006c621f1693a62 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 26 Oct 2023 08:09:23 -0400 Subject: [PATCH] fix llama.cpp model download --- .../ggerganov/llama.cpp/entrypoint.sh | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/projects/github.com/ggerganov/llama.cpp/entrypoint.sh b/projects/github.com/ggerganov/llama.cpp/entrypoint.sh index 68fb4866..e25bce82 100755 --- a/projects/github.com/ggerganov/llama.cpp/entrypoint.sh +++ b/projects/github.com/ggerganov/llama.cpp/entrypoint.sh @@ -15,18 +15,24 @@ if [ ! -f "$MODEL_DIR/$MODEL_FILENAME" ]; then EoMD echo #spacer mkdir -p "$MODEL_DIR" - aria2c "$MODEL_URL" --dir="$MODEL_DIR" + aria2c "$MODEL_URL" --dir="$MODEL_DIR" --out="$MODEL_FILENAME" gum format "# All done!" echo #spacer fi D="$(cd "$(dirname "$0")" && pwd)" -exec "$D"/bin/llama.cpp \ +if [ $# -gt 0 ]; then + exec "$D"/bin/llama.cpp \ --model "$MODEL_DIR/$MODEL_FILENAME" \ - -n 256 \ - --repeat_penalty 1.0 \ - --color \ - --interactive \ - --reverse-prompt "User:" \ - --file "$D"/share/prompts/chat-with-bob.txt + "$@" +else + exec "$D"/bin/llama.cpp \ + --model "$MODEL_DIR/$MODEL_FILENAME" \ + -n 256 \ + --repeat_penalty 1.0 \ + --color \ + --interactive \ + --reverse-prompt "User:" \ + --file "$D"/share/prompts/chat-with-bob.txt +fi