Skip to content

Commit dca7ab5

Browse files
committed
fixed tools compile error
1 parent 1559d4d commit dca7ab5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

common/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@ struct llama_model * common_load_model_from_url(
13651365
return NULL;
13661366
}
13671367

1368-
auto key_n_split = gguf_find_key(ctx_gguf, LLM_KV_SPLIT_COUNT_STR);
1368+
auto key_n_split = gguf_find_key(ctx_gguf, LLM_KV_SPLIT_COUNT);
13691369
if (key_n_split >= 0) {
13701370
n_split = gguf_get_val_u16(ctx_gguf, key_n_split);
13711371
}

examples/gguf-split/gguf-split.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ struct split_strategy {
264264

265265
// set the correct n_split for all ctx_out
266266
for (auto & ctx : ctx_outs) {
267-
gguf_set_val_u16(ctx, LLM_KV_SPLIT_COUNT_STR, ctx_outs.size());
267+
gguf_set_val_u16(ctx, LLM_KV_SPLIT_COUNT, ctx_outs.size());
268268
}
269269
}
270270

@@ -443,12 +443,12 @@ static void gguf_merge(const split_params & split_params) {
443443
ctx_metas.push_back(ctx_meta);
444444

445445
if (i_split == 0) {
446-
auto key_n_split = gguf_find_key(ctx_gguf, LLM_KV_SPLIT_COUNT_STR);
446+
auto key_n_split = gguf_find_key(ctx_gguf, LLM_KV_SPLIT_COUNT);
447447
if (key_n_split < 0) {
448448
fprintf(stderr,
449449
"\n%s: input file does not contain %s metadata\n",
450450
__func__,
451-
LLM_KV_SPLIT_COUNT_STR);
451+
LLM_KV_SPLIT_COUNT);
452452
gguf_free(ctx_gguf);
453453
ggml_free(ctx_meta);
454454
gguf_free(ctx_out);
@@ -483,7 +483,7 @@ static void gguf_merge(const split_params & split_params) {
483483
}
484484

485485
// Do not trigger merge if we try to merge again the output
486-
gguf_set_val_u16(ctx_gguf, LLM_KV_SPLIT_COUNT_STR, 0);
486+
gguf_set_val_u16(ctx_gguf, LLM_KV_SPLIT_COUNT, 0);
487487

488488
// Set metadata from the first split
489489
gguf_set_kv(ctx_out, ctx_gguf);

0 commit comments

Comments
 (0)