Try out a new way of giving prompts to the llm. Thanks pazz0. - annna - Annna t… | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 4fe31b9076b202cf38c8e06f32be274b5f3c7671 | |
parent 8ed5b38529f7a75eb8d28567d7cd995480740ee6 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Tue, 24 Dec 2024 13:15:04 +0100 | |
Try out a new way of giving prompts to the llm. Thanks pazz0. | |
Diffstat: | |
M gpt | 18 ++++++++++++------ | |
1 file changed, 12 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/gpt b/gpt | |
@@ -9,10 +9,16 @@ ggmlmodel="models/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf" | |
ggmlntokens="69" | |
cd $ggmlbase | |
-$ggmlbin -m $ggmlmodel -n $ggmlntokens \ | |
- --simple-io --no-display-prompt --grammar 'root ::= ([^\x00-\x1F])*' \ | |
- -p "$1" 2>/dev/null \ | |
- | head -n1 \ | |
- | sed -E 's/^[[:blank:]]+//;s/[[:blank:]]*\[end of text\]$//' \ | |
- | tr -d '"' | |
+prompt="$1" | |
+printf "%s\n" "${prompt}" \ | |
+ | $ggmlbin -m $ggmlmodel -n $ggmlntokens \ | |
+ --simple-io --no-display-prompt --grammar 'root ::= ([^\x00-\x… | |
+ -p "${systemprompt}" -cnv 2>/dev/null \ | |
+ | sed -E '/^$/d;s/^>[[:blank:]]+//;q' | |
+#$ggmlbin -m $ggmlmodel -n $ggmlntokens \ | |
+# --simple-io --no-display-prompt --grammar 'root ::= ([^\x00-\x1F])*' \ | |
+# -p "$1" 2>/dev/null \ | |
+# | head -n1 \ | |
+# | sed -E 's/^[[:blank:]]+//;s/[[:blank:]]*\[end of text\]$//' \ | |
+# | tr -d '"' | |