Skip to content

Commit 3a8e9af

Browse files
authored
imatrix : support combine-only (ggml-org#10492)
* imatrix-combine-only idea * ensured that behavior consistent with log
1 parent a3a3048 commit 3a8e9af

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

examples/imatrix/imatrix.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,19 @@ int main(int argc, char ** argv) {
637637
LOG_INF("%s\n", common_params_get_system_info(params).c_str());
638638
}
639639

640-
if (!compute_imatrix(ctx, params)) {
641-
return 1;
640+
if (params.prompt.empty()) {
641+
if (params.in_files.empty()) {
642+
LOG_ERR("Error: No prompt provided and no precomputed matrices (--in-file) to combine.\n");
643+
return 1;
644+
}
645+
LOG_INF("No prompt provided; combining precomputed matrices only.\n");
646+
} else {
647+
if (!compute_imatrix(ctx, params)) {
648+
return 1;
649+
}
642650
}
643651

652+
644653
g_collector.save_imatrix();
645654

646655
LOG("\n");

0 commit comments

Comments
 (0)