pantry/projects/github.com/ggerganov/llama.cpp/llama.cpp
Max Howell d8a3e7c646
+llama.cpp (#844)
llama.cpp -p "Getting paid to write open source can be accomplished in 3 simple steps:"
2023-03-24 17:53:39 -04:00

30 lines
578 B
C++
Executable file

#!/bin/sh
set -e
test -n "$VERBOSE" && set -x
D="$(cd "$(dirname "$0")"/.. && pwd)"
VERSION="$(basename "$D")"
MODEL_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/LLaMA"
export PATH="$D/tbin:$PATH"
llama-fetch "$MODEL_DIR" "$VERSION"
if test $1 = chat; then
exec "$D"/tbin/llama.cpp \
--model "$MODEL_DIR"/7B/ggml-model-q4_0.bin \
-n 256 \
--repeat_penalty 1.0 \
--color \
-i \
-r \
"User:" \
-f "$D"/share/prompts/chat-with-bob.txt
else
exec "$D"/tbin/llama.cpp \
--color \
--model "$MODEL_DIR"/7B/ggml-model-q4_0.bin \
"$@"
fi