fix llama.cpp model download

This commit is contained in:
Max Howell 2023-10-26 08:09:23 -04:00
parent 2b06942c62
commit a40a0d8fc8
No known key found for this signature in database
GPG key ID: 741BB84EF5BB9EEC

View file

@ -15,13 +15,18 @@ 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)"
if [ $# -gt 0 ]; then
exec "$D"/bin/llama.cpp \
--model "$MODEL_DIR/$MODEL_FILENAME" \
"$@"
else
exec "$D"/bin/llama.cpp \
--model "$MODEL_DIR/$MODEL_FILENAME" \
-n 256 \
@ -30,3 +35,4 @@ exec "$D"/bin/llama.cpp \
--interactive \
--reverse-prompt "User:" \
--file "$D"/share/prompts/chat-with-bob.txt
fi