aboutsummaryrefslogtreecommitdiff
path: root/utils.cpp
diff options
context:
space:
mode:
authorslaren <2141330+slaren@users.noreply.github.com>2023-03-19 19:22:48 +0100
committerGitHub <noreply@github.com>2023-03-19 20:22:48 +0200
commit50fae10d0339f2bd639f69dd679c0201d939a265 (patch)
tree907e49aae8cf271ed1080a709256ebf14d53405a /utils.cpp
parent084e2f0ec081c929343d44b09df07ae87cd1ed32 (diff)
Add --ignore-eos parameter (#181)
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Diffstat (limited to 'utils.cpp')
-rw-r--r--utils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils.cpp b/utils.cpp
index 99cb30b..a4135b9 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -71,6 +71,8 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
params.use_color = true;
} else if (arg == "-r" || arg == "--reverse-prompt") {
params.antiprompt = argv[++i];
+ } else if (arg == "--ignore-eos") {
+ params.ignore_eos = true;
} else if (arg == "-h" || arg == "--help") {
gpt_print_usage(argc, argv, params);
exit(0);
@@ -106,6 +108,7 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) {
fprintf(stderr, " --repeat_last_n N last n tokens to consider for penalize (default: %d)\n", params.repeat_last_n);
fprintf(stderr, " --repeat_penalty N penalize repeat sequence of tokens (default: %.1f)\n", params.repeat_penalty);
fprintf(stderr, " -c N, --ctx_size N size of the prompt context (default: %d)\n", params.n_ctx);
+ fprintf(stderr, " --ignore-eos ignore end of stream token and continue generating\n");
fprintf(stderr, " --memory_f16 use f16 instead of f32 for memory key+value\n");
fprintf(stderr, " --temp N temperature (default: %.1f)\n", params.temp);
fprintf(stderr, " -b N, --batch_size N batch size for prompt processing (default: %d)\n", params.n_batch);