@@ -901,6 +901,10 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
901
901
params.interactive = true ;
902
902
return true ;
903
903
}
904
+ if (arg == " --interactive-specials" ) {
905
+ params.interactive_specials = true ;
906
+ return true ;
907
+ }
904
908
if (arg == " --embedding" ) {
905
909
params.embedding = true ;
906
910
return true ;
@@ -1422,6 +1426,7 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) {
1422
1426
printf (" -h, --help show this help message and exit\n " );
1423
1427
printf (" --version show version and build info\n " );
1424
1428
printf (" -i, --interactive run in interactive mode\n " );
1429
+ printf (" --interactive-specials allow special tokens in user text, in interactive mode\n " );
1425
1430
printf (" --interactive-first run in interactive mode and wait for input right away\n " );
1426
1431
printf (" -cnv, --conversation run in conversation mode (does not print special tokens and suffix/prefix)\n " );
1427
1432
printf (" -ins, --instruct run in instruction mode (use with Alpaca models)\n " );
@@ -2652,6 +2657,7 @@ void dump_non_result_info_yaml(FILE * stream, const gpt_params & params, const l
2652
2657
dump_string_yaml_multiline (stream, " in_suffix" , params.input_prefix .c_str ());
2653
2658
fprintf (stream, " instruct: %s # default: false\n " , params.instruct ? " true" : " false" );
2654
2659
fprintf (stream, " interactive: %s # default: false\n " , params.interactive ? " true" : " false" );
2660
+ fprintf (stream, " interactive_specials: %s # default: false\n " , params.interactive_specials ? " true" : " false" );
2655
2661
fprintf (stream, " interactive_first: %s # default: false\n " , params.interactive_first ? " true" : " false" );
2656
2662
fprintf (stream, " keep: %d # default: 0\n " , params.n_keep );
2657
2663
fprintf (stream, " logdir: %s # default: unset (no logging)\n " , params.logdir .c_str ());
0 commit comments