recover main.cpp
This commit is contained in:
parent
582b13c966
commit
4f61b3066e
1 changed files with 2 additions and 4 deletions
|
@ -795,9 +795,7 @@ int main(int argc, char ** argv) {
|
|||
}
|
||||
|
||||
// deal with end of text token in interactive mode
|
||||
auto last_token = llama_sampling_last(ctx_sampling);
|
||||
if (last_token == llama_token_eos(model))
|
||||
{
|
||||
if (llama_sampling_last(ctx_sampling) == llama_token_eos(model)) {
|
||||
LOG("found EOS token\n");
|
||||
|
||||
if (params.interactive) {
|
||||
|
@ -922,7 +920,7 @@ int main(int argc, char ** argv) {
|
|||
}
|
||||
|
||||
// end of text token
|
||||
if (!embd.empty() && (embd.back() == llama_token_eos(model)) && !(params.instruct || params.interactive || params.chatml)) {
|
||||
if (!embd.empty() && embd.back() == llama_token_eos(model) && !(params.instruct || params.interactive || params.chatml)) {
|
||||
LOG_TEE(" [end of text]\n");
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue