From afa43e13c8701d99d3e01c79fc0ab5fb746aae78 Mon Sep 17 00:00:00 2001 From: Francis Couture-Harpin Date: Sun, 3 Aug 2025 18:03:53 -0400 Subject: [PATCH] imatrix : add warning when suffix is not .gguf for GGUF imatrix --- tools/imatrix/imatrix.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/imatrix/imatrix.cpp b/tools/imatrix/imatrix.cpp index 9ceceb478d..aaf52eb742 100644 --- a/tools/imatrix/imatrix.cpp +++ b/tools/imatrix/imatrix.cpp @@ -512,7 +512,11 @@ void IMatrixCollector::save_imatrix(int32_t n_chunk) const { this->save_imatrix_legacy(n_chunk); return; } - // else, default to GGUF imatrix + if (!string_ends_with(fname, ".gguf")) { + // allowed, but hopefully this raises awareness + LOG_WRN("\n%s: saving imatrix using GGUF format with a different suffix than .gguf\n", __func__); + LOG_WRN("%s: if you want the previous imatrix format, use --output-format dat\n", __func__); + } if (n_chunk > 0) { fname += ".at_";