From 110deb68cf0750a6430fb61bc9c6d8f3d6934a4a Mon Sep 17 00:00:00 2001 From: baalajimaestro Date: Sat, 6 Jul 2024 23:35:58 +0530 Subject: [PATCH] Add more params for llama Signed-off-by: baalajimaestro --- run_model.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/run_model.sh b/run_model.sh index 5b4d76a0..e9362a85 100755 --- a/run_model.sh +++ b/run_model.sh @@ -5,9 +5,20 @@ sleep 10 if [ -n "$INIT_MODELS" ]; then - /ollama/ollama rm model || true - echo "FROM /models/$MODEL_NAME" > /tmp/Modelfile - /ollama/ollama create -f /tmp/Modelfile model + /ollama/ollama rm model || true + echo "FROM /models/$MODEL_NAME" > /tmp/Modelfile + echo "PARAMETER temperature 1" >> /tmp/Modelfile + echo "PARAMETER num_ctx 4096" >> /tmp/Modelfile + echo 'PARAMETER stop ["<|im_start|>","<|im_end|>"]' >> /tmp/Modelfile + echo 'TEMPLATE """{{ if .System }}<|im_start|>system' >> /tmp/Modelfile + echo "{{ .System }}<|im_end|>" >> /tmp/Modelfile + echo "{{ end }}{{ if .Prompt }}<|im_start|>user" >> /tmp/Modelfile + echo "{{ .Prompt }}<|im_end|>" >> /tmp/Modelfile + echo "{{ end }}<|im_start|>assistant" >> /tmp/Modelfile + echo "{{ .Response }}<|im_end|>" >> /tmp/Modelfile + echo '"""' >> /tmp/Modelfile + echo 'SYSTEM """You are Samantha, a sentient AI."""' >> /tmp/Modelfile + /ollama/ollama create -f /tmp/Modelfile model fi /ollama/ollama run model