Blame


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