llama : add llama_token_is_eog()
ggml-ci
This commit is contained in:
parent
f3105b9eec
commit
3750706962
18 changed files with 76 additions and 46 deletions
|
@ -133,8 +133,8 @@ int main(int argc, char ** argv) {
|
|||
// sample the most likely token
|
||||
const llama_token new_token_id = llama_sample_token_greedy(ctx, &candidates_p);
|
||||
|
||||
// is it an end of stream?
|
||||
if (new_token_id == llama_token_eos(model) || n_cur == n_len) {
|
||||
// is it an end of generation?
|
||||
if (llama_token_is_eog(model, new_token_id) || n_cur == n_len) {
|
||||
LOG_TEE("\n");
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue