jeopardy.sh 846 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. set -e
  3. MODEL=./models/ggml-vicuna-13b-1.1-q4_0.bin
  4. MODEL_NAME=Vicuna
  5. # exec options
  6. prefix="Human: " # Ex. Vicuna uses "Human: "
  7. opts="--temp 0 -n 80" # additional flags
  8. nl='
  9. '
  10. introduction="You will be playing a game of Jeopardy. Simply answer the question in the correct format (Ex. What is Paris, or Who is George Washington)."
  11. # file options
  12. question_file=./examples/jeopardy/questions.txt
  13. touch ./examples/jeopardy/results/$MODEL_NAME.txt
  14. output_file=./examples/jeopardy/results/$MODEL_NAME.txt
  15. counter=1
  16. echo 'Running'
  17. while IFS= read -r question
  18. do
  19. exe_cmd="./main -p "\"$prefix$introduction$nl$prefix$question\"" "$opts" -m ""\"$MODEL\""" >> ""\"$output_file\""
  20. echo $counter
  21. echo "Current Question: $question"
  22. eval "$exe_cmd"
  23. echo -e "\n------" >> $output_file
  24. counter=$((counter+1))
  25. done < "$question_file"