imatrix : support combine-only (#10492)

* imatrix-combine-only idea

* ensured that behavior consistent with log
This commit is contained in:
Robert Collins 2024-11-29 12:21:37 -05:00 committed by GitHub
parent a3a3048e7a
commit 3a8e9af402
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -637,9 +637,18 @@ int main(int argc, char ** argv) {
LOG_INF("%s\n", common_params_get_system_info(params).c_str()); LOG_INF("%s\n", common_params_get_system_info(params).c_str());
} }
if (params.prompt.empty()) {
if (params.in_files.empty()) {
LOG_ERR("Error: No prompt provided and no precomputed matrices (--in-file) to combine.\n");
return 1;
}
LOG_INF("No prompt provided; combining precomputed matrices only.\n");
} else {
if (!compute_imatrix(ctx, params)) { if (!compute_imatrix(ctx, params)) {
return 1; return 1;
} }
}
g_collector.save_imatrix(); g_collector.save_imatrix();