Skip to content

Instantly share code, notes, and snippets.

@cloudchristoph
Created July 19, 2023 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cloudchristoph/af94cbf14c8d559d3845de1e5fa6af19 to your computer and use it in GitHub Desktop.
Save cloudchristoph/af94cbf14c8d559d3845de1e5fa6af19 to your computer and use it in GitHub Desktop.
Chat directly from command line ▶️ ./chat.sh 'Hello Llama!'
# Prerequisite: https://gist.github.com/adrienbrault/b76631c56c736def9bc1bc2167b5d129
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
# Check if command line argument is given
if [ $# -eq 0 ]; then
echo "Prompt: " &&
read PROMPT
else
PROMPT=$1
fi
# Run
./main \
-t 8 \
-ngl 1 \
-m ${MODEL} \
--color \
-c 2048 \
--temp 0.7 \
--repeat_penalty 1.1 \
-n -1 \
-p "### Instruction: ${PROMPT} \n### Response:"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment