Reinstate original jeopardy.sh

This commit is contained in:
pudepiedj 2023-10-06 09:54:32 +01:00
parent 325fcb75ad
commit 8b7d88afff

View file

@ -1,11 +1,11 @@
#!/bin/bash #!/bin/bash
set -e set -e
MODEL=./models/llama-2-7b/ggml-model-q4_0.gguf MODEL=./models/ggml-vicuna-13b-1.1-q4_0.bin
MODEL_NAME=Llama2-7b-ggml-q4 MODEL_NAME=Vicuna
# exec options # exec options
prefix="Question: " # Ex. Vicuna uses "Human: " prefix="Human: " # Ex. Vicuna uses "Human: "
opts="--temp 0 -n 80" # additional flags opts="--temp 0 -n 80" # additional flags
nl=' nl='
' '
@ -13,7 +13,6 @@ introduction="You will be playing a game of Jeopardy. Simply answer the question
# file options # file options
question_file=./examples/jeopardy/questions.txt question_file=./examples/jeopardy/questions.txt
# if the required model file doesn't exist, create it; otherwise update it
touch ./examples/jeopardy/results/$MODEL_NAME.txt touch ./examples/jeopardy/results/$MODEL_NAME.txt
output_file=./examples/jeopardy/results/$MODEL_NAME.txt output_file=./examples/jeopardy/results/$MODEL_NAME.txt
@ -22,7 +21,7 @@ counter=1
echo 'Running' echo 'Running'
while IFS= read -r question while IFS= read -r question
do do
exe_cmd="./build/bin/main -p "\"$nl$prefix$question\"" "$opts" -m ""\"$MODEL\""" >> ""\"$output_file\"" exe_cmd="./main -p "\"$prefix$introduction$nl$prefix$question\"" "$opts" -m ""\"$MODEL\""" >> ""\"$output_file\""
echo $counter echo $counter
echo "Current Question: $question" echo "Current Question: $question"
eval "$exe_cmd" eval "$exe_cmd"