mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-25 05:48:47 +01:00
gguf : fix a few general keys (#3341)
This commit is contained in:
parent
dc6897404e
commit
20c7e1e804
@ -367,10 +367,10 @@ bool falcon_model_load(const std::string & fname, falcon_model & model, gpt2bpe_
|
|||||||
keyidx = gguf_find_key(ggufctx, "general.architecture");
|
keyidx = gguf_find_key(ggufctx, "general.architecture");
|
||||||
if (keyidx != -1) { printf("%s: model architecture = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
if (keyidx != -1) { printf("%s: model architecture = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
||||||
keyidx = gguf_find_key(ggufctx, "general.file_type");
|
keyidx = gguf_find_key(ggufctx, "general.file_type");
|
||||||
if (keyidx != -1) { printf("%s: model file type = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
if (keyidx != -1) { printf("%s: model file type = %" PRIu32 "\n", __func__, gguf_get_val_u32(ggufctx, keyidx)); }
|
||||||
keyidx = gguf_find_key(ggufctx, "gptneox.tensor_data_layout");
|
keyidx = gguf_find_key(ggufctx, "gptneox.tensor_data_layout");
|
||||||
if (keyidx != -1) { printf("%s: model data layout = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
if (keyidx != -1) { printf("%s: model data layout = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
||||||
keyidx = gguf_find_key(ggufctx, "general.source.hugginface.repository");
|
keyidx = gguf_find_key(ggufctx, "general.source.huggingface.repository");
|
||||||
if (keyidx != -1) { printf("%s: model source HF repo = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
if (keyidx != -1) { printf("%s: model source HF repo = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,10 +380,10 @@ bool gpt_neox_model_load(const std::string & fname, gpt_neox_model & model, gpt2
|
|||||||
keyidx = gguf_find_key(ggufctx, "general.architecture");
|
keyidx = gguf_find_key(ggufctx, "general.architecture");
|
||||||
if (keyidx != -1) { printf("%s: model architecture = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
if (keyidx != -1) { printf("%s: model architecture = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
||||||
keyidx = gguf_find_key(ggufctx, "general.file_type");
|
keyidx = gguf_find_key(ggufctx, "general.file_type");
|
||||||
if (keyidx != -1) { printf("%s: model file type = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
if (keyidx != -1) { printf("%s: model file type = %" PRIu32 "\n", __func__, gguf_get_val_u32(ggufctx, keyidx)); }
|
||||||
keyidx = gguf_find_key(ggufctx, "gptneox.tensor_data_layout");
|
keyidx = gguf_find_key(ggufctx, "gptneox.tensor_data_layout");
|
||||||
if (keyidx != -1) { printf("%s: model data layout = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
if (keyidx != -1) { printf("%s: model data layout = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
||||||
keyidx = gguf_find_key(ggufctx, "general.source.hugginface.repository");
|
keyidx = gguf_find_key(ggufctx, "general.source.huggingface.repository");
|
||||||
if (keyidx != -1) { printf("%s: model source HF repo = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
if (keyidx != -1) { printf("%s: model source HF repo = %s\n", __func__, gguf_get_val_str(ggufctx, keyidx)); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ KEY_GENERAL_URL = "general.url"
|
|||||||
KEY_GENERAL_DESCRIPTION = "general.description"
|
KEY_GENERAL_DESCRIPTION = "general.description"
|
||||||
KEY_GENERAL_LICENSE = "general.license"
|
KEY_GENERAL_LICENSE = "general.license"
|
||||||
KEY_GENERAL_SOURCE_URL = "general.source.url"
|
KEY_GENERAL_SOURCE_URL = "general.source.url"
|
||||||
KEY_GENERAL_SOURCE_HF_REPO = "general.source.hugginface.repository"
|
KEY_GENERAL_SOURCE_HF_REPO = "general.source.huggingface.repository"
|
||||||
KEY_GENERAL_FILE_TYPE = "general.file_type"
|
KEY_GENERAL_FILE_TYPE = "general.file_type"
|
||||||
|
|
||||||
# LLM
|
# LLM
|
||||||
|
@ -229,8 +229,8 @@ static std::map<llm_kv, std::string> LLM_KV_NAMES = {
|
|||||||
{ LLM_KV_GENERAL_URL, "general.url" },
|
{ LLM_KV_GENERAL_URL, "general.url" },
|
||||||
{ LLM_KV_GENERAL_DESCRIPTION, "general.description" },
|
{ LLM_KV_GENERAL_DESCRIPTION, "general.description" },
|
||||||
{ LLM_KV_GENERAL_LICENSE, "general.license" },
|
{ LLM_KV_GENERAL_LICENSE, "general.license" },
|
||||||
{ LLM_KV_GENERAL_SOURCE_URL, "general.source_url" },
|
{ LLM_KV_GENERAL_SOURCE_URL, "general.source.url" },
|
||||||
{ LLM_KV_GENERAL_SOURCE_HF_REPO, "general.source_hf_repo" },
|
{ LLM_KV_GENERAL_SOURCE_HF_REPO, "general.source.huggingface.repository" },
|
||||||
|
|
||||||
{ LLM_KV_CONTEXT_LENGTH, "%s.context_length" },
|
{ LLM_KV_CONTEXT_LENGTH, "%s.context_length" },
|
||||||
{ LLM_KV_EMBEDDING_LENGTH, "%s.embedding_length" },
|
{ LLM_KV_EMBEDDING_LENGTH, "%s.embedding_length" },
|
||||||
|
Loading…
Reference in New Issue
Block a user