diff --git a/common/common.cpp b/common/common.cpp index a026fe509..ffc98137d 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -906,7 +906,7 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa return true; } if (arg == "--no-special") { - params.ctrl_token_no_out = true; + params.no_special = true; return true; } if (arg == "--embedding") { diff --git a/common/common.h b/common/common.h index f7556cfec..87e771ca1 100644 --- a/common/common.h +++ b/common/common.h @@ -142,7 +142,7 @@ struct gpt_params { bool use_color = false; // use color to distinguish generations and inputs bool interactive = false; // interactive mode bool interactive_specials = false; // whether to allow special tokens from user, during interactive mode - bool ctrl_token_no_out = false; // disable control token output + bool no_special = false; // disable control token output bool conversation = false; // conversation mode (does not print special tokens and suffix/prefix) bool chatml = false; // chatml mode (used for models trained on chatml syntax) bool prompt_cache_all = false; // save user input and generations to prompt cache diff --git a/examples/main/main.cpp b/examples/main/main.cpp index d5288a5e6..fc5486181 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -760,7 +760,7 @@ int main(int argc, char ** argv) { if (!llama_token_is_control_token(llama_get_model(ctx), id)) { // Stream Output Token To Standard Output fprintf(stdout, "%s", token_str.c_str()); - } else if (!params.ctrl_token_no_out) { + } else if (!params.no_special) { #ifndef _MSC_VER if (control_token_file_descriptor_is_attached) { // Stream Control Token To Special Token Output. Useful for debugging control token behaviour