mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 01:24:36 +00:00
fixed tools compile error
This commit is contained in:
parent
1559d4d2fb
commit
dca7ab5d9e
2 changed files with 5 additions and 5 deletions
|
@ -1365,7 +1365,7 @@ struct llama_model * common_load_model_from_url(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto key_n_split = gguf_find_key(ctx_gguf, LLM_KV_SPLIT_COUNT_STR);
|
auto key_n_split = gguf_find_key(ctx_gguf, LLM_KV_SPLIT_COUNT);
|
||||||
if (key_n_split >= 0) {
|
if (key_n_split >= 0) {
|
||||||
n_split = gguf_get_val_u16(ctx_gguf, key_n_split);
|
n_split = gguf_get_val_u16(ctx_gguf, key_n_split);
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,7 +264,7 @@ struct split_strategy {
|
||||||
|
|
||||||
// set the correct n_split for all ctx_out
|
// set the correct n_split for all ctx_out
|
||||||
for (auto & ctx : ctx_outs) {
|
for (auto & ctx : ctx_outs) {
|
||||||
gguf_set_val_u16(ctx, LLM_KV_SPLIT_COUNT_STR, ctx_outs.size());
|
gguf_set_val_u16(ctx, LLM_KV_SPLIT_COUNT, ctx_outs.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,12 +443,12 @@ static void gguf_merge(const split_params & split_params) {
|
||||||
ctx_metas.push_back(ctx_meta);
|
ctx_metas.push_back(ctx_meta);
|
||||||
|
|
||||||
if (i_split == 0) {
|
if (i_split == 0) {
|
||||||
auto key_n_split = gguf_find_key(ctx_gguf, LLM_KV_SPLIT_COUNT_STR);
|
auto key_n_split = gguf_find_key(ctx_gguf, LLM_KV_SPLIT_COUNT);
|
||||||
if (key_n_split < 0) {
|
if (key_n_split < 0) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"\n%s: input file does not contain %s metadata\n",
|
"\n%s: input file does not contain %s metadata\n",
|
||||||
__func__,
|
__func__,
|
||||||
LLM_KV_SPLIT_COUNT_STR);
|
LLM_KV_SPLIT_COUNT);
|
||||||
gguf_free(ctx_gguf);
|
gguf_free(ctx_gguf);
|
||||||
ggml_free(ctx_meta);
|
ggml_free(ctx_meta);
|
||||||
gguf_free(ctx_out);
|
gguf_free(ctx_out);
|
||||||
|
@ -483,7 +483,7 @@ static void gguf_merge(const split_params & split_params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not trigger merge if we try to merge again the output
|
// Do not trigger merge if we try to merge again the output
|
||||||
gguf_set_val_u16(ctx_gguf, LLM_KV_SPLIT_COUNT_STR, 0);
|
gguf_set_val_u16(ctx_gguf, LLM_KV_SPLIT_COUNT, 0);
|
||||||
|
|
||||||
// Set metadata from the first split
|
// Set metadata from the first split
|
||||||
gguf_set_kv(ctx_out, ctx_gguf);
|
gguf_set_kv(ctx_out, ctx_gguf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue