llama : avoid hardcoded special tokens
This commit is contained in:
parent
035d511457
commit
5d2656d670
11 changed files with 61 additions and 65 deletions
|
@ -106,7 +106,7 @@ int main(int argc, char ** argv) {
|
|||
new_token_id = llama_sample_token_greedy(ctx , &candidates_p);
|
||||
|
||||
// is it an end of stream ?
|
||||
if (new_token_id == llama_token_eos()) {
|
||||
if (new_token_id == llama_token_eos(ctx)) {
|
||||
fprintf(stderr, " [end of text]\n");
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue