Skip to content

Commit 968b25e

Browse files
committed
llama-cli : skip llama_add_eos_token assertion check in encoder-decoder models
1 parent 9267a13 commit 968b25e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: examples/main/main.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ int main(int argc, char ** argv) {
244244
}
245245

246246
const bool add_bos = llama_should_add_bos_token(model);
247+
if (!llama_model_has_encoder(model)) {
248+
GGML_ASSERT(llama_add_eos_token(model) != 1);
249+
}
247250
LOG("add_bos: %d\n", add_bos);
248251

249252
std::vector<llama_token> embd_inp;

0 commit comments

Comments
 (0)