Skip to content

Commit a464b6f

Browse files
fairydreamingsszymczy
authored andcommitted
llama : add assert about missing llama_encode() call (ggml-org#8400)
Co-authored-by: Stanisław Szymczyk <[email protected]>
1 parent 86c1042 commit a464b6f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/llama.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13201,6 +13201,8 @@ struct llm_build_context {
1320113201
LLM_NORM_RMS, cb, -1);
1320213202
cb(cur, "result_norm", -1);
1320313203
} else {
13204+
GGML_ASSERT(n_outputs_enc > 0 && "call llama_encode() first");
13205+
1320413206
struct ggml_tensor * embd_enc = llm_build_inp_embd_enc();
1320513207
struct ggml_tensor * pos_bucket_dec = llm_build_pos_bucket(true);
1320613208

0 commit comments

Comments
 (0)