summaryrefslogtreecommitdiff
path: root/common/common.cpp
diff options
context:
space:
mode:
authorSigbjørn Skjæret <sigbjorn.skjaeret@scala.com>2024-03-27 08:23:10 +0100
committerGitHub <noreply@github.com>2024-03-27 09:23:10 +0200
commite562b9714b9b3e242361a7f74bbbeb00f6bd99ac (patch)
treeae5716b7a08a0830d3e09e4542c4ac9887f6aa58 /common/common.cpp
parent2ab4f00d25c0682a74472412d66454df211e4b0e (diff)
common : change --no-penalize-nl to --penalize-nl (#6334)
* Change --no-penalize-nl to --penalize-nl * Update documentation too
Diffstat (limited to 'common/common.cpp')
-rw-r--r--common/common.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/common.cpp b/common/common.cpp
index 5fd33e2a..b8323c1c 100644
--- a/common/common.cpp
+++ b/common/common.cpp
@@ -1062,8 +1062,8 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
params.ignore_eos = true;
return true;
}
- if (arg == "--no-penalize-nl") {
- sparams.penalize_nl = false;
+ if (arg == "--penalize-nl") {
+ sparams.penalize_nl = true;
return true;
}
if (arg == "-l" || arg == "--logit-bias") {
@@ -1373,7 +1373,7 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) {
printf(" -dt N, --defrag-thold N\n");
printf(" KV cache defragmentation threshold (default: %.1f, < 0 - disabled)\n", params.defrag_thold);
printf(" --ignore-eos ignore end of stream token and continue generating (implies --logit-bias 2-inf)\n");
- printf(" --no-penalize-nl do not penalize newline token\n");
+ printf(" --penalize-nl penalize newline tokens\n");
printf(" --temp N temperature (default: %.1f)\n", (double)sparams.temp);
printf(" --all-logits return logits for all tokens in the batch (default: disabled)\n");
printf(" --hellaswag compute HellaSwag score over random tasks from datafile supplied with -f\n");
@@ -2489,7 +2489,7 @@ void dump_non_result_info_yaml(FILE * stream, const gpt_params & params, const l
fprintf(stream, "n_predict: %d # default: -1 (unlimited)\n", params.n_predict);
fprintf(stream, "n_probs: %d # only used by server binary, default: 0\n", sparams.n_probs);
fprintf(stream, "no_mmap: %s # default: false\n", !params.use_mmap ? "true" : "false");
- fprintf(stream, "no_penalize_nl: %s # default: false\n", !sparams.penalize_nl ? "true" : "false");
+ fprintf(stream, "penalize_nl: %s # default: false\n", sparams.penalize_nl ? "true" : "false");
fprintf(stream, "ppl_output_type: %d # default: 0\n", params.ppl_output_type);
fprintf(stream, "ppl_stride: %d # default: 0\n", params.ppl_stride);
fprintf(stream, "presence_penalty: %f # default: 0.0\n", sparams.penalty_present);