gguf : add gguf_get_kv_type

This commit is contained in:
M. Yusuf Sarıgöz
2023-08-11 12:24:08 +03:00
parent b2440f1943
commit eb8ca6996f
3 changed files with 12 additions and 4 deletions

View File

@@ -652,6 +652,9 @@ struct gguf_file_saver {
const char * key = gguf_get_key(any_file_loader->gguf_ctx, i);
if (strcmp(key, "general.quantization_version") == 0) {
file.write_val<uint32_t>("general.quantization_version", GGUF_TYPE_UINT32, new_ftype);
} else {
const gguf_type vtype = gguf_get_kv_type(any_file_loader->gguf_ctx, i);
GGML_UNUSED(vtype);
}
}