Skip to content

Commit a8be1e6

Browse files
llama : add assert about missing llama_encode() call (#8400)
Co-authored-by: Stanisław Szymczyk <[email protected]>
1 parent e4dd31f commit a8be1e6

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
@@ -13200,6 +13200,8 @@ struct llm_build_context {
1320013200
LLM_NORM_RMS, cb, -1);
1320113201
cb(cur, "result_norm", -1);
1320213202
} else {
13203+
GGML_ASSERT(n_outputs_enc > 0 && "call llama_encode() first");
13204+
1320313205
struct ggml_tensor * embd_enc = llm_build_inp_embd_enc();
1320413206
struct ggml_tensor * pos_bucket_dec = llm_build_pos_bucket(true);
1320513207

0 commit comments

Comments
 (0)