diff options
author | nhamanasu <45545786+nhamanasu@users.noreply.github.com> | 2023-07-29 03:02:10 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 21:02:10 +0300 |
commit | 34ae1caf7fdea4c4c09087002e15e6230102e6a9 (patch) | |
tree | 820bb84382c26ae0787b9a60bc6a76dd07d7b15d /examples/server-llama2-13B.sh | |
parent | d91f3f0c55663719ea03b76311e8c36ed55eb0e2 (diff) |
examples : server chat mode with llama2 (#2400)
* add: server chat mode with llama2
* fix: remove the unnecessary last \n
Diffstat (limited to 'examples/server-llama2-13B.sh')
-rw-r--r-- | examples/server-llama2-13B.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/server-llama2-13B.sh b/examples/server-llama2-13B.sh new file mode 100644 index 0000000..d7f3698 --- /dev/null +++ b/examples/server-llama2-13B.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -e + +cd "$(dirname "$0")/.." || exit + +# Specify the model you want to use here: +MODEL="${MODEL:-./models/llama-2-13b-chat.ggmlv3.q5_K_M.bin}" +PROMPT_TEMPLATE=${PROMPT_TEMPLATE:-./prompts/chat-system.txt} + +# Adjust to the number of CPU cores you want to use. +N_THREAD="${N_THREAD:-12}" + +# Note: you can also override the generation options by specifying them on the command line: +GEN_OPTIONS="${GEN_OPTIONS:---ctx_size 4096 --batch-size 1024}" + + +# shellcheck disable=SC2086 # Intended splitting of GEN_OPTIONS +./server $GEN_OPTIONS \ + --model "$MODEL" \ + --threads "$N_THREAD" \ + --rope-freq-scale 1.0 \ + "$@" + + # I used this to test the model with mps, but omitted it from the general purpose. If you want to use it, just specify it on the command line. + # -ngl 1 \ |