gguf : write metadata in gguf_file_saver
This commit is contained in:
parent
781b9ec3f5
commit
d09fd10713
3 changed files with 38 additions and 1 deletions
4
ggml.c
4
ggml.c
|
@ -19035,6 +19035,10 @@ enum gguf_type gguf_get_kv_type(struct gguf_context * ctx, int i) {
|
|||
return ctx->header.kv[i].type;
|
||||
}
|
||||
|
||||
enum gguf_type gguf_get_arr_type(struct gguf_context * ctx, int i) {
|
||||
return ctx->header.kv[i].value.arr.type;
|
||||
}
|
||||
|
||||
const char * gguf_get_arr_str(struct gguf_context * ctx, int key_id, int i) {
|
||||
struct gguf_kv * kv = &ctx->header.kv[key_id];
|
||||
struct gguf_str * str = &((struct gguf_str *) kv->value.arr.data)[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue