mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	imatrix : use GGUF by default (#14842)
* imatrix : use GGUF by default * imatrix : use GGUF regardless of the output filename The legacy format can only be produced with --output-format dat
This commit is contained in:
		| @@ -26,7 +26,7 @@ | ||||
| static void print_usage(int, char ** argv) { | ||||
|     LOG("\nexample usage:\n"); | ||||
|     LOG("\n    %s \\\n" | ||||
|             "       -m model.gguf -f some-text.txt [-o imatrix.gguf] [--no-ppl] \\\n" | ||||
|             "       -m model.gguf -f some-text.txt [-o imatrix.gguf] [--output-format {gguf,dat}] [--no-ppl] \\\n" | ||||
|             "       [--process-output] [--chunk 123] [--save-frequency 0] [--output-frequency 10] \\\n" | ||||
|             "       [--in-file imatrix-prev-0.gguf --in-file imatrix-prev-1.gguf ...] [--parse-special] \\\n" | ||||
|             "       [--show-statistics] [...]\n" , argv[0]); | ||||
| @@ -506,13 +506,13 @@ void IMatrixCollector::save_imatrix_legacy(int32_t ncall) const { | ||||
|  | ||||
| void IMatrixCollector::save_imatrix(int32_t n_chunk) const { | ||||
|     auto fname = m_params.out_file; | ||||
|     bool use_legacy_format = m_params.imat_dat; | ||||
|  | ||||
|     // TODO: use the new format in more cases | ||||
|     if (!string_ends_with(fname, ".gguf")) { | ||||
|         LOG_WRN("\n%s: saving to legacy imatrix format because output suffix is not .gguf\n", __func__); | ||||
|     if (use_legacy_format) { | ||||
|         this->save_imatrix_legacy(n_chunk); | ||||
|         return; | ||||
|     } | ||||
|     // else, default to GGUF imatrix | ||||
|  | ||||
|     if (n_chunk > 0) { | ||||
|         fname += ".at_"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 compilade
					compilade