MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / common_params_print_usage

Function common_params_print_usage

common/arg.cpp:646–673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646static void common_params_print_usage(common_params_context & ctx_arg) {
647 auto print_options = [](std::vector<common_arg *> & options) {
648 for (common_arg * opt : options) {
649 printf("%s", opt->to_string().c_str());
650 }
651 };
652
653 std::vector<common_arg *> common_options;
654 std::vector<common_arg *> sparam_options;
655 std::vector<common_arg *> specific_options;
656 for (auto & opt : ctx_arg.options) {
657 // in case multiple LLAMA_EXAMPLE_* are set, we prioritize the LLAMA_EXAMPLE_* matching current example
658 if (opt.is_sparam) {
659 sparam_options.push_back(&opt);
660 } else if (opt.in_example(ctx_arg.ex)) {
661 specific_options.push_back(&opt);
662 } else {
663 common_options.push_back(&opt);
664 }
665 }
666 printf("----- common params -----\n\n");
667 print_options(common_options);
668 printf("\n\n----- sampling params -----\n\n");
669 print_options(sparam_options);
670 // TODO: maybe convert enum llama_example to string
671 printf("\n\n----- example-specific params -----\n\n");
672 print_options(specific_options);
673}
674
675static void common_params_print_completion(common_params_context & ctx_arg) {
676 std::vector<common_arg *> common_options;

Callers 1

common_params_parseFunction · 0.85

Calls 3

in_exampleMethod · 0.80
to_stringMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected