Skip to content

Commit

Permalink
llama : fix Baichuan2 13B (ggerganov#6092)
Browse files Browse the repository at this point in the history
  • Loading branch information
slaren authored Mar 15, 2024
1 parent 877b4d0 commit d84c485
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6000,7 +6000,7 @@ struct llm_build_context {
inpL = llm_build_inp_embd(ctx0, lctx, hparams, batch, model.tok_embd, cb);

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

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


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

0 comments on commit d84c485

Please sign in to comment.