Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Commit 2bc8d71

Browse files
committed
chore: bump llama.cpp
Signed-off-by: thxCode <thxcode0824@gmail.com>
1 parent 62a9539 commit 2bc8d71

10 files changed

Lines changed: 50 additions & 50 deletions

File tree

llama-box/patches/llama.cpp/common.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ index c6962d1d..5aca359d 100644
4242
llama_memory_clear(llama_get_memory(lctx), true);
4343
llama_synchronize(lctx);
4444
diff --git a/src/llama-context.cpp b/src/llama-context.cpp
45-
index bd637f3d..45c5b697 100644
45+
index 958bcc04..3696e1a4 100644
4646
--- a/src/llama-context.cpp
4747
+++ b/src/llama-context.cpp
4848
@@ -982,9 +982,9 @@ int llama_context::decode(const llama_batch & batch_inp) {

llama-box/patches/llama.cpp/context.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/src/llama-context.cpp b/src/llama-context.cpp
2-
index bd637f3d..6e9e5ed4 100644
2+
index 958bcc04..423343d9 100644
33
--- a/src/llama-context.cpp
44
+++ b/src/llama-context.cpp
55
@@ -126,7 +126,7 @@ llama_context::llama_context(

llama-box/patches/llama.cpp/embedding.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ index 2cbe18d8..9338aac6 100644
1111
LLAMA_API uint32_t llama_n_batch (const struct llama_context * ctx);
1212
LLAMA_API uint32_t llama_n_ubatch (const struct llama_context * ctx);
1313
diff --git a/src/llama-context.cpp b/src/llama-context.cpp
14-
index bd637f3d..a1975ba3 100644
14+
index 958bcc04..6aa9bd39 100644
1515
--- a/src/llama-context.cpp
1616
+++ b/src/llama-context.cpp
1717
@@ -122,6 +122,20 @@ llama_context::llama_context(
@@ -76,7 +76,7 @@ index bd637f3d..a1975ba3 100644
7676
return ctx->n_ctx();
7777
}
7878
diff --git a/src/llama-context.h b/src/llama-context.h
79-
index 7cfdc6a5..798e3d7e 100644
79+
index 25c143d5..f6d1f43c 100644
8080
--- a/src/llama-context.h
8181
+++ b/src/llama-context.h
8282
@@ -35,6 +35,7 @@ struct llama_context {

llama-box/patches/llama.cpp/model.patch

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/src/llama-arch.cpp b/src/llama-arch.cpp
2-
index 15fb9d0b..c0472daa 100644
2+
index ba7bf959..c908b7aa 100644
33
--- a/src/llama-arch.cpp
44
+++ b/src/llama-arch.cpp
55
@@ -17,6 +17,7 @@ static const std::map<llm_arch, const char *> LLM_ARCH_NAMES = {
@@ -10,7 +10,7 @@ index 15fb9d0b..c0472daa 100644
1010
{ LLM_ARCH_BERT, "bert" },
1111
{ LLM_ARCH_NOMIC_BERT, "nomic-bert" },
1212
{ LLM_ARCH_NOMIC_BERT_MOE, "nomic-bert-moe" },
13-
@@ -481,6 +482,22 @@ static const std::map<llm_arch, std::map<llm_tensor, const char *>> LLM_TENSOR_N
13+
@@ -482,6 +483,22 @@ static const std::map<llm_arch, std::map<llm_tensor, const char *>> LLM_TENSOR_N
1414
{ LLM_TENSOR_FFN_UP, "blk.%d.ffn_up" },
1515
},
1616
},
@@ -34,7 +34,7 @@ index 15fb9d0b..c0472daa 100644
3434
LLM_ARCH_BERT,
3535
{
3636
diff --git a/src/llama-arch.h b/src/llama-arch.h
37-
index 8ea80806..27728c0d 100644
37+
index 9b8bd65b..48f62367 100644
3838
--- a/src/llama-arch.h
3939
+++ b/src/llama-arch.h
4040
@@ -21,6 +21,7 @@ enum llm_arch {
@@ -46,7 +46,7 @@ index 8ea80806..27728c0d 100644
4646
LLM_ARCH_NOMIC_BERT,
4747
LLM_ARCH_NOMIC_BERT_MOE,
4848
diff --git a/src/llama-model.cpp b/src/llama-model.cpp
49-
index 3983a693..c2b01fa5 100644
49+
index 60a615c1..9c130b7d 100644
5050
--- a/src/llama-model.cpp
5151
+++ b/src/llama-model.cpp
5252
@@ -757,6 +757,16 @@ void llama_model::load_hparams(llama_model_loader & ml) {
@@ -66,15 +66,15 @@ index 3983a693..c2b01fa5 100644
6666
case LLM_ARCH_NOMIC_BERT:
6767
case LLM_ARCH_NOMIC_BERT_MOE:
6868
{
69-
@@ -2539,6 +2549,7 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
69+
@@ -2552,6 +2562,7 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
7070
layer.ffn_up_b = create_tensor(tn(LLM_TENSOR_FFN_UP, "bias", i), {n_ff}, 0);
7171
}
7272
} break;
7373
+ case LLM_ARCH_NEW:
7474
case LLM_ARCH_BERT:
7575
case LLM_ARCH_NOMIC_BERT:
7676
case LLM_ARCH_NOMIC_BERT_MOE:
77-
@@ -2546,7 +2557,7 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
77+
@@ -2559,7 +2570,7 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
7878
tok_embd = create_tensor(tn(LLM_TENSOR_TOKEN_EMBD, "weight"), {n_embd, n_vocab}, 0);
7979
type_embd = create_tensor(tn(LLM_TENSOR_TOKEN_TYPES, "weight"), {n_embd, n_token_types}, TENSOR_NOT_REQUIRED);
8080

@@ -83,7 +83,7 @@ index 3983a693..c2b01fa5 100644
8383
pos_embd = create_tensor(tn(LLM_TENSOR_POS_EMBD, "weight"), {n_embd, n_ctx_train}, 0);
8484

8585
cls = create_tensor(tn(LLM_TENSOR_CLS, "weight"), {n_embd, n_embd}, TENSOR_NOT_REQUIRED);
86-
@@ -2587,12 +2598,16 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
86+
@@ -2600,12 +2611,16 @@ bool llama_model::load_tensors(llama_model_loader & ml) {
8787
layer.ffn_down_exps = create_tensor(tn(LLM_TENSOR_FFN_DOWN_EXPS, "weight", i), { n_ff, n_embd, n_expert}, 0);
8888
layer.ffn_gate_inp = create_tensor(tn(LLM_TENSOR_FFN_GATE_INP, "weight", i), {n_embd, n_expert}, 0);
8989
} else {
@@ -103,7 +103,7 @@ index 3983a693..c2b01fa5 100644
103103
layer.ffn_down_b = create_tensor(tn(LLM_TENSOR_FFN_DOWN, "bias", i), {n_embd}, 0);
104104
} else {
105105
layer.ffn_gate = create_tensor(tn(LLM_TENSOR_FFN_GATE, "weight", i), {n_embd, n_ff}, 0);
106-
@@ -7093,7 +7108,7 @@ struct llm_build_bert : public llm_graph_context {
106+
@@ -7139,7 +7154,7 @@ struct llm_build_bert : public llm_graph_context {
107107
ggml_tensor * type_row0 = ggml_view_1d(ctx0, model.type_embd, n_embd, 0);
108108
inpL = ggml_add(ctx0, inpL, type_row0);
109109
}
@@ -112,7 +112,7 @@ index 3983a693..c2b01fa5 100644
112112
inpL = ggml_add(ctx0, ggml_get_rows(ctx0, model.pos_embd, inp_pos), inpL);
113113
}
114114
cb(inpL, "inp_embd", -1);
115-
@@ -7152,7 +7167,7 @@ struct llm_build_bert : public llm_graph_context {
115+
@@ -7198,7 +7213,7 @@ struct llm_build_bert : public llm_graph_context {
116116
Vcur = ggml_reshape_3d(ctx0, Vcur, n_embd_head, n_head_kv, n_tokens);
117117

118118
// RoPE
@@ -121,7 +121,7 @@ index 3983a693..c2b01fa5 100644
121121
Qcur = ggml_rope_ext(
122122
ctx0, Qcur, inp_pos, nullptr,
123123
n_rot, rope_type, n_ctx_orig, freq_base, freq_scale,
124-
@@ -7211,6 +7226,13 @@ struct llm_build_bert : public llm_graph_context {
124+
@@ -7257,6 +7272,13 @@ struct llm_build_bert : public llm_graph_context {
125125
0.0f,
126126
LLAMA_EXPERT_GATING_FUNC_TYPE_SOFTMAX, il);
127127
cb(cur, "ffn_moe_out", il);
@@ -135,15 +135,15 @@ index 3983a693..c2b01fa5 100644
135135
} else if (model.arch == LLM_ARCH_BERT || model.arch == LLM_ARCH_NOMIC_BERT_MOE) {
136136
cur = build_ffn(cur,
137137
model.layers[il].ffn_up, model.layers[il].ffn_up_b, NULL,
138-
@@ -17371,6 +17393,7 @@ llama_memory_i * llama_model::create_memory(const llama_memory_params & params,
138+
@@ -17555,6 +17577,7 @@ llama_memory_i * llama_model::create_memory(const llama_memory_params & params,
139139
switch (arch) {
140140
// Models that need specific instantiation should be handled in the
141141
// switch statement
142142
+ case LLM_ARCH_NEW:
143143
case LLM_ARCH_BERT:
144144
case LLM_ARCH_JINA_BERT_V2:
145145
case LLM_ARCH_NOMIC_BERT:
146-
@@ -17983,6 +18006,7 @@ llama_rope_type llama_model_rope_type(const llama_model * model) {
146+
@@ -18172,6 +18195,7 @@ llama_rope_type llama_model_rope_type(const llama_model * model) {
147147
case LLM_ARCH_FALCON_H1:
148148
case LLM_ARCH_GROK:
149149
case LLM_ARCH_DBRX:

llama-box/patches/llama.cpp/model_py.patch

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/convert_hf_to_gguf.py b/convert_hf_to_gguf.py
2-
index db411231..21e5b04e 100755
2+
index 9303a047..5d984687 100755
33
--- a/convert_hf_to_gguf.py
44
+++ b/convert_hf_to_gguf.py
5-
@@ -4694,6 +4694,123 @@ class XLMRobertaModel(BertModel):
5+
@@ -4703,6 +4703,123 @@ class XLMRobertaModel(BertModel):
66
return super().modify_tensors(data_torch, name, bid)
77

88

@@ -127,7 +127,7 @@ index db411231..21e5b04e 100755
127127
class GemmaModel(TextModel):
128128
model_arch = gguf.MODEL_ARCH.GEMMA
129129
diff --git a/gguf-py/gguf/constants.py b/gguf-py/gguf/constants.py
130-
index ef47ea73..e4a9b1a9 100644
130+
index 5707085c..0cd3bf84 100644
131131
--- a/gguf-py/gguf/constants.py
132132
+++ b/gguf-py/gguf/constants.py
133133
@@ -309,6 +309,7 @@ class MODEL_ARCH(IntEnum):
@@ -138,15 +138,15 @@ index ef47ea73..e4a9b1a9 100644
138138
BERT = auto()
139139
NOMIC_BERT = auto()
140140
NOMIC_BERT_MOE = auto()
141-
@@ -629,6 +630,7 @@ MODEL_ARCH_NAMES: dict[MODEL_ARCH, str] = {
141+
@@ -630,6 +631,7 @@ MODEL_ARCH_NAMES: dict[MODEL_ARCH, str] = {
142142
MODEL_ARCH.MPT: "mpt",
143143
MODEL_ARCH.STARCODER: "starcoder",
144144
MODEL_ARCH.REFACT: "refact",
145145
+ MODEL_ARCH.NEW: "new",
146146
MODEL_ARCH.BERT: "bert",
147147
MODEL_ARCH.NOMIC_BERT: "nomic-bert",
148148
MODEL_ARCH.NOMIC_BERT_MOE: "nomic-bert-moe",
149-
@@ -1131,6 +1133,20 @@ MODEL_TENSORS: dict[MODEL_ARCH, list[MODEL_TENSOR]] = {
149+
@@ -1133,6 +1135,20 @@ MODEL_TENSORS: dict[MODEL_ARCH, list[MODEL_TENSOR]] = {
150150
MODEL_TENSOR.FFN_DOWN,
151151
MODEL_TENSOR.FFN_UP,
152152
],
@@ -168,50 +168,50 @@ index ef47ea73..e4a9b1a9 100644
168168
MODEL_TENSOR.TOKEN_EMBD,
169169
MODEL_TENSOR.TOKEN_EMBD_NORM,
170170
diff --git a/gguf-py/gguf/tensor_mapping.py b/gguf-py/gguf/tensor_mapping.py
171-
index df490fc8..feba8c2e 100644
171+
index e6efc93f..44a054ec 100644
172172
--- a/gguf-py/gguf/tensor_mapping.py
173173
+++ b/gguf-py/gguf/tensor_mapping.py
174-
@@ -165,6 +165,7 @@ class TensorNameMap:
174+
@@ -167,6 +167,7 @@ class TensorNameMap:
175175
"model.layers.{bid}.self_attn.query_key_value", # persimmon
176176
"h.{bid}.attn.c_attn", # gpt2
177177
"transformer.h.{bid}.mixer.Wqkv", # phi2
178178
+ "encoder.layer.{bid}.attention.qkv_proj", # new
179179
"encoder.layers.{bid}.attn.Wqkv", # nomic-bert
180180
"encoder.layers.{bid}.mixer.Wqkv", # jina
181181
"model.layers.{bid}.self_attn.qkv_proj", # phi3
182-
@@ -234,6 +235,7 @@ class TensorNameMap:
182+
@@ -239,6 +240,7 @@ class TensorNameMap:
183183
"model.layers.{bid}.self_attn.out_proj", # lfm2
184184
"model.layers.{bid}.self_attn.linear_attn", # deci
185185
"layers.{bid}.attention.wo", # llama-pth
186186
+ "encoder.layer.{bid}.attention.o_proj", # new
187187
"encoder.layer.{bid}.attention.output.dense", # bert
188188
"transformer.layer.{bid}.attention.out_lin", # distillbert
189189
"transformer.h.{bid}.attn.out_proj", # gpt-j
190-
@@ -258,6 +260,7 @@ class TensorNameMap:
190+
@@ -264,6 +266,7 @@ class TensorNameMap:
191191

192192
# Attention output norm
193193
MODEL_TENSOR.ATTN_OUT_NORM: (
194194
+ "encoder.layer.{bid}.attn_ln", # new
195195
"encoder.layer.{bid}.attention.output.LayerNorm", # bert
196196
"transformer.layer.{bid}.sa_layer_norm", # distillbert
197197
"encoder.layers.{bid}.norm1", # nomic-bert
198-
@@ -347,6 +350,7 @@ class TensorNameMap:
198+
@@ -354,6 +357,7 @@ class TensorNameMap:
199199
"h.{bid}.mlp.dense_h_to_4h", # bloom
200200
"model.layers.{bid}.mlp.up_proj", # llama-hf refact nemotron olmo2
201201
"layers.{bid}.feed_forward.w3", # llama-pth
202202
+ "encoder.layer.{bid}.mlp.up_gate_proj", # new
203203
"encoder.layer.{bid}.intermediate.dense", # bert
204204
"transformer.layer.{bid}.ffn.lin1", # distillbert
205205
"transformer.h.{bid}.mlp.fc_in", # gpt-j
206-
@@ -444,6 +448,7 @@ class TensorNameMap:
206+
@@ -453,6 +457,7 @@ class TensorNameMap:
207207
"h.{bid}.mlp.dense_4h_to_h", # bloom
208208
"model.layers.{bid}.mlp.down_proj", # llama-hf nemotron olmo2
209209
"layers.{bid}.feed_forward.w2", # llama-pth
210210
+ "encoder.layer.{bid}.mlp.down_proj", # new
211211
"encoder.layer.{bid}.output.dense", # bert
212212
"transformer.layer.{bid}.ffn.lin2", # distillbert
213213
"transformer.h.{bid}.mlp.fc_out", # gpt-j
214-
@@ -515,6 +520,7 @@ class TensorNameMap:
214+
@@ -527,6 +532,7 @@ class TensorNameMap:
215215
),
216216

217217
MODEL_TENSOR.LAYER_OUT_NORM: (

llama-box/patches/llama.cpp/mrope.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ index 337f7985..f7508d7d 100644
5252
GGML_ASSERT( dst->type == GGML_TYPE_F16 || dst->type == GGML_TYPE_F32);
5353

5454
diff --git a/ggml/src/ggml-opencl/ggml-opencl.cpp b/ggml/src/ggml-opencl/ggml-opencl.cpp
55-
index 984d35a2..93b9c1fa 100644
55+
index c9316eb7..5d249658 100644
5656
--- a/ggml/src/ggml-opencl/ggml-opencl.cpp
5757
+++ b/ggml/src/ggml-opencl/ggml-opencl.cpp
58-
@@ -6616,10 +6616,6 @@ static void ggml_cl_rope(ggml_backend_t backend, const ggml_tensor * src0, const
58+
@@ -6682,10 +6682,6 @@ static void ggml_cl_rope(ggml_backend_t backend, const ggml_tensor * src0, const
5959
const bool is_mrope = mode & GGML_ROPE_TYPE_MROPE;
6060
const bool is_vision = mode == GGML_ROPE_TYPE_VISION;
6161

llama-box/patches/llama.cpp/template.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/src/llama-chat.cpp b/src/llama-chat.cpp
2-
index d34bb268..e079bbbb 100644
2+
index c4576e24..753b866b 100644
33
--- a/src/llama-chat.cpp
44
+++ b/src/llama-chat.cpp
55
@@ -60,6 +60,9 @@ static const std::map<std::string, llm_chat_template> LLM_CHAT_TEMPLATES = {
@@ -12,7 +12,7 @@ index d34bb268..e079bbbb 100644
1212
{ "megrez", LLM_CHAT_TEMPLATE_MEGREZ },
1313
{ "yandex", LLM_CHAT_TEMPLATE_YANDEX },
1414
{ "bailing", LLM_CHAT_TEMPLATE_BAILING },
15-
@@ -181,6 +184,8 @@ llm_chat_template llm_chat_detect_template(const std::string & tmpl) {
15+
@@ -182,6 +185,8 @@ llm_chat_template llm_chat_detect_template(const std::string & tmpl) {
1616
return LLM_CHAT_TEMPLATE_GRANITE;
1717
} else if (tmpl_contains("message['role'] + additional_special_tokens[0] + message['content'] + additional_special_tokens[1]")) {
1818
return LLM_CHAT_TEMPLATE_GIGACHAT;
@@ -21,7 +21,7 @@ index d34bb268..e079bbbb 100644
2121
} else if (tmpl_contains("<|role_start|>")) {
2222
return LLM_CHAT_TEMPLATE_MEGREZ;
2323
} else if (tmpl_contains(" Ассистент:")) {
24-
@@ -606,6 +611,61 @@ int32_t llm_chat_apply_template(
24+
@@ -609,6 +614,61 @@ int32_t llm_chat_apply_template(
2525
if (add_ass) {
2626
ss << "assistant<|role_sep|>";
2727
}
@@ -84,7 +84,7 @@ index d34bb268..e079bbbb 100644
8484
// Megrez template
8585
for (auto message : chat) {
8686
diff --git a/src/llama-chat.h b/src/llama-chat.h
87-
index 6968a19f..66a5b78f 100644
87+
index 4cf77fd2..437a6b85 100644
8888
--- a/src/llama-chat.h
8989
+++ b/src/llama-chat.h
9090
@@ -39,6 +39,9 @@ enum llm_chat_template {

llama-box/patches/llama.cpp/tool_calling.patch

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/common/chat.cpp b/common/chat.cpp
2-
index 0c777d7a..937e93a6 100644
2+
index c5a840e8..9c1fa4ed 100644
33
--- a/common/chat.cpp
44
+++ b/common/chat.cpp
55
@@ -494,6 +494,13 @@ void common_chat_templates_free(struct common_chat_templates * tmpls) {
@@ -16,7 +16,7 @@ index 0c777d7a..937e93a6 100644
1616
bool common_chat_templates_was_explicit(const struct common_chat_templates * tmpls) {
1717
return tmpls->has_explicit_template;
1818
}
19-
@@ -1816,6 +1823,83 @@ static common_chat_params common_chat_templates_apply_jinja(
19+
@@ -1814,6 +1821,83 @@ static common_chat_params common_chat_templates_apply_jinja(
2020
return common_chat_params_init_generic(tmpl, params);
2121
}
2222

@@ -100,7 +100,7 @@ index 0c777d7a..937e93a6 100644
100100
// Legacy template route (adhoc C++ implementation of known templates), forward to llama_chat_apply_template.
101101
static common_chat_params common_chat_templates_apply_legacy(
102102
const struct common_chat_templates * tmpls,
103-
@@ -1874,6 +1958,17 @@ static common_chat_params common_chat_templates_apply_legacy(
103+
@@ -1872,6 +1956,17 @@ static common_chat_params common_chat_templates_apply_legacy(
104104
return params;
105105
}
106106

@@ -118,7 +118,7 @@ index 0c777d7a..937e93a6 100644
118118
common_chat_params common_chat_templates_apply(
119119
const struct common_chat_templates * tmpls,
120120
const struct common_chat_templates_inputs & inputs)
121-
@@ -1936,7 +2031,7 @@ common_chat_msg common_chat_parse(const std::string & input, bool is_partial, co
121+
@@ -1934,7 +2029,7 @@ common_chat_msg common_chat_parse(const std::string & input, bool is_partial, co
122122
try {
123123
common_chat_parse(builder);
124124
} catch (const common_chat_msg_partial_exception & ex) {
@@ -127,7 +127,7 @@ index 0c777d7a..937e93a6 100644
127127
if (!is_partial) {
128128
builder.clear_tools();
129129
builder.move_to(0);
130-
@@ -1944,8 +2039,8 @@ common_chat_msg common_chat_parse(const std::string & input, bool is_partial, co
130+
@@ -1942,8 +2037,8 @@ common_chat_msg common_chat_parse(const std::string & input, bool is_partial, co
131131
}
132132
}
133133
auto msg = builder.result();
@@ -222,10 +222,10 @@ index 2cbe18d8..1208c1b8 100644
222222
/// Both "model" and "custom_template" are optional, but at least one is required. "custom_template" has higher precedence than "model"
223223
/// NOTE: This function does not use a jinja parser. It only support a pre-defined list of template. See more: https://github.com/ggml-org/llama.cpp/wiki/Templates-supported-by-llama_chat_apply_template
224224
diff --git a/src/llama-chat.cpp b/src/llama-chat.cpp
225-
index d34bb268..c47868f8 100644
225+
index c4576e24..b72f1e12 100644
226226
--- a/src/llama-chat.cpp
227227
+++ b/src/llama-chat.cpp
228-
@@ -199,6 +199,606 @@ llm_chat_template llm_chat_detect_template(const std::string & tmpl) {
228+
@@ -202,6 +202,606 @@ llm_chat_template llm_chat_detect_template(const std::string & tmpl) {
229229
return LLM_CHAT_TEMPLATE_UNKNOWN;
230230
}
231231

@@ -833,7 +833,7 @@ index d34bb268..c47868f8 100644
833833
// This function uses heuristic checks to determine commonly used template. It is not a jinja parser.
834834
int32_t llm_chat_apply_template(
835835
diff --git a/src/llama-chat.h b/src/llama-chat.h
836-
index 6968a19f..baaef734 100644
836+
index 4cf77fd2..6e270212 100644
837837
--- a/src/llama-chat.h
838838
+++ b/src/llama-chat.h
839839
@@ -3,6 +3,7 @@
@@ -844,7 +844,7 @@ index 6968a19f..baaef734 100644
844844

845845
enum llm_chat_template {
846846
LLM_CHAT_TEMPLATE_CHATML,
847-
@@ -52,10 +53,19 @@ enum llm_chat_template {
847+
@@ -53,10 +54,19 @@ enum llm_chat_template {
848848

849849
struct llama_chat_message;
850850

@@ -865,10 +865,10 @@ index 6968a19f..baaef734 100644
865865
llm_chat_template tmpl,
866866
const std::vector<const llama_chat_message *> & chat,
867867
diff --git a/src/llama-model.cpp b/src/llama-model.cpp
868-
index 3983a693..5cd7c6be 100644
868+
index 60a615c1..e8defba8 100644
869869
--- a/src/llama-model.cpp
870870
+++ b/src/llama-model.cpp
871-
@@ -17869,6 +17869,10 @@ void llama_model_free(llama_model * model) {
871+
@@ -18058,6 +18058,10 @@ void llama_model_free(llama_model * model) {
872872
delete model;
873873
}
874874

0 commit comments

Comments
 (0)