File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 8
8
# cd llama.cpp
9
9
# make -j
10
10
#
11
- # ./examples/base-translate.sh <model-base> "<text>"
11
+ # ./examples/base-translate.sh <model-base> "<text>" [extra-main-args]
12
12
#
13
13
14
- if [ $# -ne 2 ]; then
15
- echo " Usage: ./base-translate.sh <model-base> \" <text>\" "
14
+ if [ $# -lt 2 ]; then
15
+ echo " Usage: ./base-translate.sh <model-base> \" <text>\" [extra-main-args] "
16
16
exit 1
17
17
fi
18
18
19
+ eargs=" "
20
+ if [ $# -gt 2 ]; then
21
+ eargs=" ${@: 3} "
22
+ fi
23
+
19
24
ftmp=" __llama.cpp_example_tmp__.txt"
20
25
trap " rm -f $ftmp " EXIT
21
26
@@ -52,5 +57,5 @@ echo "$2
52
57
53
58
model=$1
54
59
55
- # generate the most likely continuation, run on the CPU until the string "===" is found
56
- ./main -m $model -f $ftmp -n 64 --temp 0 --repeat-penalty 1.0 --no-penalize-nl -ngl 0 - r " ==="
60
+ # generate the most likely continuation until the string "===" is found
61
+ ./main -m $model -f $ftmp -n 64 --temp 0 --repeat-penalty 1.0 --no-penalize-nl -r " ===" $eargs
You can’t perform that action at this time.
0 commit comments