summaryrefslogtreecommitdiff
path: root/common/common.h
diff options
context:
space:
mode:
authorPierrick Hymbert <pierrick.hymbert@gmail.com>2024-04-26 20:06:33 +0200
committerGitHub <noreply@github.com>2024-04-26 20:06:33 +0200
commit0c4d489e29e53589bf13a801fe7c94b7b546d8f6 (patch)
treefc83fade919050b3a9471dd892d8aef438c39aaf /common/common.h
parent017e6999b5184234370b22a2f868e1be911e8d88 (diff)
quantize: add imatrix and dataset metadata in GGUF (#6658)
* imatrix: save the dataset file used in the output file * llama: support kv overrides type string string * common: factorize KV Overrides parsing between common and server * quantize: add imatrix n entries and dataset KV metadata quantize: factorize KV Overrides parsing between common #6656 * llama: remove kv override str_value initialization as it does not compile on some toolchain * quantize: add imatrix m_last_call as `quantize.imatrix.chunks_count` * quantize: add imatrix filename in KV * llama: add llama_model_kv_override_free * common: add llama_model_kv_override_free common: free kv override if used after model loading * llama: finally move the string KV override value to the stack * llama : minor * no need to add a NUL to the std::vector, std::string can be initialized from a pair of iterators. Co-authored-by: slaren <slarengh@gmail.com> * kv override: ensure string termination --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> Co-authored-by: slaren <slarengh@gmail.com>
Diffstat (limited to 'common/common.h')
-rw-r--r--common/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/common.h b/common/common.h
index 0005f143..96a28a6c 100644
--- a/common/common.h
+++ b/common/common.h
@@ -171,6 +171,8 @@ struct gpt_params {
std::string image = ""; // path to an image file
};
+bool parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides);
+
bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params);
bool gpt_params_parse(int argc, char ** argv, gpt_params & params);