Skip to content

Commit

Permalink
imatrix : support combine-only (ggerganov#10492)
Browse files Browse the repository at this point in the history
* imatrix-combine-only idea

* ensured that behavior consistent with log
  • Loading branch information
robbiemu authored Nov 29, 2024
1 parent a3a3048 commit 3a8e9af
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions examples/imatrix/imatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,10 +637,19 @@ int main(int argc, char ** argv) {
LOG_INF("%s\n", common_params_get_system_info(params).c_str());
}

if (!compute_imatrix(ctx, params)) {
return 1;
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)) {
return 1;
}
}


g_collector.save_imatrix();

LOG("\n");
Expand Down

0 comments on commit 3a8e9af

Please sign in to comment.