Skip to content

Commit 382d18f

Browse files
slarenhodlen
authored andcommitted
llama : fix Baichuan2 13B (ggml-org#6092)
1 parent bd209bf commit 382d18f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llama.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6000,7 +6000,7 @@ struct llm_build_context {
60006000
inpL = llm_build_inp_embd(ctx0, lctx, hparams, batch, model.tok_embd, cb);
60016001

60026002
// inp_pos - contains the positions
6003-
struct ggml_tensor * inp_pos = build_inp_pos();
6003+
struct ggml_tensor * inp_pos = model.type == MODEL_7B ? build_inp_pos() : nullptr;
60046004

60056005
// KQ_mask (mask for 1 head, it will be broadcasted to all heads)
60066006
struct ggml_tensor * KQ_mask = build_inp_KQ_mask();
@@ -6050,7 +6050,6 @@ struct llm_build_context {
60506050
cb(Qcur, "Qcur", il);
60516051
cb(Kcur, "Kcur", il);
60526052

6053-
60546053
cur = llm_build_kv(ctx0, model, hparams, kv_self, gf,
60556054
model.layers[il].wo, NULL,
60566055
Kcur, Vcur, Qcur, KQ_mask, KQ_pos, n_ctx, n_tokens, kv_head, n_kv, 1.0f/sqrtf(float(n_embd_head)), cb, il);

0 commit comments

Comments
 (0)