Blob


1 #!/bin/sh
3 # https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2
5 sys='<|start_header_id|>system<|end_header_id|>
6 You summarise text provided by the user. Reply only with the summary text.<|eot_id|>
7 <|start_header_id|>user<|end_header_id|>'
9 tmp=`mktemp`
10 echo "$sys" > $tmp
11 cat >> $tmp
12 echo '<|eot_id|>' >> $tmp
13 echo -n '<|start_header_id|>assistant<|end_header_id|>' >> $tmp
15 usage="usage: precis [model]"
17 model=$HOME/llama-3.2-3b-instruct-q4_k_m.gguf
18 if test $1
19 then
20 model=$1
21 fi
23 llama-cli -m --no-display-prompt -c 8192 -f $tmp 2>/dev/null
24 rm $tmp