@@ -841,15 +841,15 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
841
841
params.defrag_thold = std::stof (argv[i]);
842
842
return true ;
843
843
}
844
- if (arg == " --samplers" || arg == " --constraints " ) {
844
+ if (arg == " --samplers" ) {
845
845
CHECK_ARG
846
- const auto constraint_names = string_split (argv[i], ' ;' );
847
- sparams.constraints = gpt_constraint_types_from_names (constraint_names , true );
846
+ const auto sampler_names = string_split (argv[i], ' ;' );
847
+ sparams.samplers = gpt_sampler_types_from_names (sampler_names , true );
848
848
return true ;
849
849
}
850
850
if (arg == " --sampling-seq" ) {
851
851
CHECK_ARG
852
- sparams.constraints = gpt_constraint_types_from_chars (argv[i]);
852
+ sparams.samplers = gpt_sampler_types_from_chars (argv[i]);
853
853
return true ;
854
854
}
855
855
if (arg == " --top-p" ) {
@@ -1696,13 +1696,13 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
1696
1696
void gpt_params_print_usage (int /* argc*/ , char ** argv, const gpt_params & params) {
1697
1697
const auto & sparams = params.sparams ;
1698
1698
1699
- std::string constraint_type_chars ;
1700
- std::string constraint_type_names ;
1701
- for (const auto & constraint : sparams.constraints ) {
1702
- constraint_type_chars += gpt_constraint_type_to_chr (constraint );
1703
- constraint_type_names += gpt_constraint_type_to_str (constraint ) + " ;" ;
1699
+ std::string sampler_type_chars ;
1700
+ std::string sampler_type_names ;
1701
+ for (const auto & sampler : sparams.samplers ) {
1702
+ sampler_type_chars += gpt_sampler_type_to_chr (sampler );
1703
+ sampler_type_names += gpt_sampler_type_to_str (sampler ) + " ;" ;
1704
1704
}
1705
- constraint_type_names .pop_back ();
1705
+ sampler_type_names .pop_back ();
1706
1706
1707
1707
struct option_info {
1708
1708
LLAMA_COMMON_ATTRIBUTE_FORMAT (4 , 5 )
@@ -1816,9 +1816,9 @@ void gpt_params_print_usage(int /*argc*/, char ** argv, const gpt_params & param
1816
1816
options.push_back ({ " sampling" });
1817
1817
options.push_back ({ " *" , " -s, --seed SEED" , " RNG seed (default: %d, use random seed for < 0)" , sparams.seed });
1818
1818
options.push_back ({ " *" , " --samplers SAMPLERS" , " samplers that will be used for generation in the order, separated by \' ;\'\n "
1819
- " (default: %s)" , constraint_type_names .c_str () });
1819
+ " (default: %s)" , sampler_type_names .c_str () });
1820
1820
options.push_back ({ " *" , " --sampling-seq SEQUENCE" ,
1821
- " simplified sequence for samplers that will be used (default: %s)" , constraint_type_chars .c_str () });
1821
+ " simplified sequence for samplers that will be used (default: %s)" , sampler_type_chars .c_str () });
1822
1822
options.push_back ({ " *" , " --ignore-eos" , " ignore end of stream token and continue generating (implies --logit-bias EOS-inf)" });
1823
1823
options.push_back ({ " *" , " --penalize-nl" , " penalize newline tokens (default: %s)" , sparams.penalize_nl ? " true" : " false" });
1824
1824
options.push_back ({ " *" , " --temp T" , " temperature (default: %.1f)" , (double )sparams.temp });
0 commit comments