Skip to content

Commit 00b02bb

Browse files
authored
imatrix : fix arg parser for imatrix (ggml-org#9366)
* imatrix : fix arg parser * beautify printing first arg
1 parent a876861 commit 00b02bb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

common/common.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,9 @@ std::string llama_arg::to_string() {
600600
if (args.size() == 1) {
601601
ss << arg;
602602
} else {
603-
ss << format("%-7s", arg) << ", ";
603+
// first arg is usually abbreviation, we need padding to make it more beautiful
604+
auto tmp = std::string(arg) + ", ";
605+
ss << format("%-7s", tmp.c_str());
604606
}
605607
} else {
606608
ss << arg << (arg != args.back() ? ", " : "");

examples/imatrix/imatrix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ int main(int argc, char ** argv) {
577577
params.logits_all = true;
578578
params.verbosity = 1;
579579

580-
auto options = gpt_params_parser_init(params, LLAMA_EXAMPLE_COMMON, print_usage);
580+
auto options = gpt_params_parser_init(params, LLAMA_EXAMPLE_IMATRIX, print_usage);
581581
if (!gpt_params_parse(argc, argv, params, options)) {
582582
return 1;
583583
}

0 commit comments

Comments
 (0)