Skip to content

Commit e562b97

Browse files
authored
common : change --no-penalize-nl to --penalize-nl (#6334)
* Change --no-penalize-nl to --penalize-nl * Update documentation too
1 parent 2ab4f00 commit e562b97

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/common.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,8 +1062,8 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
10621062
params.ignore_eos = true;
10631063
return true;
10641064
}
1065-
if (arg == "--no-penalize-nl") {
1066-
sparams.penalize_nl = false;
1065+
if (arg == "--penalize-nl") {
1066+
sparams.penalize_nl = true;
10671067
return true;
10681068
}
10691069
if (arg == "-l" || arg == "--logit-bias") {
@@ -1373,7 +1373,7 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) {
13731373
printf(" -dt N, --defrag-thold N\n");
13741374
printf(" KV cache defragmentation threshold (default: %.1f, < 0 - disabled)\n", params.defrag_thold);
13751375
printf(" --ignore-eos ignore end of stream token and continue generating (implies --logit-bias 2-inf)\n");
1376-
printf(" --no-penalize-nl do not penalize newline token\n");
1376+
printf(" --penalize-nl penalize newline tokens\n");
13771377
printf(" --temp N temperature (default: %.1f)\n", (double)sparams.temp);
13781378
printf(" --all-logits return logits for all tokens in the batch (default: disabled)\n");
13791379
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
24892489
fprintf(stream, "n_predict: %d # default: -1 (unlimited)\n", params.n_predict);
24902490
fprintf(stream, "n_probs: %d # only used by server binary, default: 0\n", sparams.n_probs);
24912491
fprintf(stream, "no_mmap: %s # default: false\n", !params.use_mmap ? "true" : "false");
2492-
fprintf(stream, "no_penalize_nl: %s # default: false\n", !sparams.penalize_nl ? "true" : "false");
2492+
fprintf(stream, "penalize_nl: %s # default: false\n", sparams.penalize_nl ? "true" : "false");
24932493
fprintf(stream, "ppl_output_type: %d # default: 0\n", params.ppl_output_type);
24942494
fprintf(stream, "ppl_stride: %d # default: 0\n", params.ppl_stride);
24952495
fprintf(stream, "presence_penalty: %f # default: 0.0\n", sparams.penalty_present);

0 commit comments

Comments
 (0)