Skip to content

Distribute and run LLMs with a single file.

Release llamafile v0.8.17

Justine Tunneyc88f2d3b7163
diff --git a/llama.cpp/common.cpp b/llama.cpp/common.cpp
index 83644263..1c215ff3 100644
--- a/llama.cpp/common.cpp
+++ b/llama.cpp/common.cpp
@@ -311,9 +311,10 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
}
return true;
}
- if (arg == "-p" || arg == "--prompt") {
+ if (arg == "-p" || arg == "--prompt" || arg == "--system-prompt") {
CHECK_ARG
params.prompt = argv[i];
+ FLAG_prompt = argv[i]; // [jart]
return true;
}
if (arg == "-e" || arg == "--escape") {
diff --git a/llamafile/flags.cpp b/llamafile/flags.cpp
index def697e6..bcd1d2fc 100644
--- a/llamafile/flags.cpp
+++ b/llamafile/flags.cpp
@@ -188,6 +188,13 @@ void llamafile_get_flags(int argc, char **argv) {
continue;
}
+ if (!strcmp(flag, "--prompt") || !strcmp(flag, "--system-prompt")) {
+ if (i == argc)
+ missing("--prompt");
+ FLAG_prompt = argv[i++];
+ continue;
+ }
+
if (!strcmp(flag, "--db")) {
if (i == argc)
missing("--db");
diff --git a/llamafile/server/main.1 b/llamafile/server/main.1
index 4b0a720a..58a59a43 100644
--- a/llamafile/server/main.1
+++ b/llamafile/server/main.1
@@ -58,7 +58,7 @@ resources, and control how much completion parallelism can happen.
Please note that
.Fl Fl ctx-size
has a strong influence on how many slots can be created.
-.It Fl p Ar TEXT , Fl Fl prompt Ar TEXT
+.It Fl p Ar TEXT , Fl Fl prompt Ar TEXT , Fl Fl system-prompt Ar TEXT
Specifies system prompt. This value is passed along to the web frontend.
.It Fl Fl no-display-prompt
Hide system prompt from web user interface.
diff --git a/llamafile/server/main.1.asc b/llamafile/server/main.1.asc
index a9534f23..c2db481e 100644
--- a/llamafile/server/main.1.asc
+++ b/llamafile/server/main.1.asc
@@ -64,7 +64,7 @@
note that --ctx-size has a strong influence on how many slots
can be created.
- -p TEXT, --prompt TEXT
+ -p TEXT, --prompt TEXT, --system-prompt TEXT
Specifies system prompt. This value is passed along to the web
frontend.
diff --git a/llamafile/version.h b/llamafile/version.h
index 4b0bed49..ba219daf 100644
--- a/llamafile/version.h
+++ b/llamafile/version.h
@@ -2,7 +2,7 @@
#define LLAMAFILE_MAJOR 0
#define LLAMAFILE_MINOR 8
-#define LLAMAFILE_PATCH 16
+#define LLAMAFILE_PATCH 17
#define LLAMAFILE_VERSION \
(100000000 * LLAMAFILE_MAJOR + 1000000 * LLAMAFILE_MINOR + LLAMAFILE_PATCH)