update
This commit is contained in:
parent
5432cc18da
commit
3a916678e3
2 changed files with 11 additions and 2 deletions
11
README.org
11
README.org
|
@ -1085,4 +1085,13 @@ $14 = {header = {magic = "GGUF", version = 2, n_tensors = 291, n_kv = 20},
|
||||||
kv = 0x555556ffc2f0, infos = 0x55555716d5f0, alignment = 0, offset = 0, size = 0,
|
kv = 0x555556ffc2f0, infos = 0x55555716d5f0, alignment = 0, offset = 0, size = 0,
|
||||||
data = 0x0}
|
data = 0x0}
|
||||||
(gdb)
|
(gdb)
|
||||||
l
|
|
||||||
|
This key we can treat differently and we can imagine a template class attachd to the dynamic model or
|
||||||
|
even a customized class for it.
|
||||||
|
$5 = {key = {n = 21, data = 0x555555e1cb50 "tokenizer.ggml.tokens"},
|
||||||
|
type = GGUF_TYPE_ARRAY, value = {uint8 = 0 '\000', int8 = 0 '\000', uint16 = 0,
|
||||||
|
int16 = 0, uint32 = 0, int32 = 0, float32 = 0, uint64 = 0, int64 = 0, float64 = 0,
|
||||||
|
bool_ = false, str = {n = 0, data = 0x0}, arr = {type = GGUF_TYPE_UINT8, n = 0,
|
||||||
|
data = 0x0}}}
|
||||||
|
|
||||||
|
|
||||||
|
|
2
ggml.cpp
2
ggml.cpp
|
@ -18476,7 +18476,7 @@ struct gguf_context * gguf_init_from_file(const char * fname, struct gguf_init_p
|
||||||
for (uint64_t i = 0; i < ctx->header.n_kv; ++i) {
|
for (uint64_t i = 0; i < ctx->header.n_kv; ++i) {
|
||||||
struct gguf_kv * kv = &ctx->kv[i];
|
struct gguf_kv * kv = &ctx->kv[i];
|
||||||
|
|
||||||
//fprintf(stderr, "%s: reading kv %d\n", __func__, i);
|
fprintf(stderr, "%s: reading kv %d\n", __func__, i);
|
||||||
|
|
||||||
ok = ok && gguf_fread_str(file, &kv->key, &offset);
|
ok = ok && gguf_fread_str(file, &kv->key, &offset);
|
||||||
ok = ok && gguf_fread_el (file, &kv->type, sizeof(kv->type), &offset);
|
ok = ok && gguf_fread_el (file, &kv->type, sizeof(kv->type), &offset);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue