Skip to content

Commit 8f76ba5

Browse files
committed
main: refactor ctrl_token_no_out --> no_special
1 parent 7d52482 commit 8f76ba5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

common/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
906906
return true;
907907
}
908908
if (arg == "--no-special") {
909-
params.ctrl_token_no_out = true;
909+
params.no_special = true;
910910
return true;
911911
}
912912
if (arg == "--embedding") {

common/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct gpt_params {
142142
bool use_color = false; // use color to distinguish generations and inputs
143143
bool interactive = false; // interactive mode
144144
bool interactive_specials = false; // whether to allow special tokens from user, during interactive mode
145-
bool ctrl_token_no_out = false; // disable control token output
145+
bool no_special = false; // disable control token output
146146
bool conversation = false; // conversation mode (does not print special tokens and suffix/prefix)
147147
bool chatml = false; // chatml mode (used for models trained on chatml syntax)
148148
bool prompt_cache_all = false; // save user input and generations to prompt cache

examples/main/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ int main(int argc, char ** argv) {
760760
if (!llama_token_is_control_token(llama_get_model(ctx), id)) {
761761
// Stream Output Token To Standard Output
762762
fprintf(stdout, "%s", token_str.c_str());
763-
} else if (!params.ctrl_token_no_out) {
763+
} else if (!params.no_special) {
764764
#ifndef _MSC_VER
765765
if (control_token_file_descriptor_is_attached) {
766766
// Stream Control Token To Special Token Output. Useful for debugging control token behaviour

0 commit comments

Comments
 (0)