Skip to content

Commit

Permalink
eos is always used for termination.
Browse files Browse the repository at this point in the history
This could solve issue #26.
  • Loading branch information
Judd committed Jun 21, 2024
1 parent 8bdacf8 commit b52435a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ namespace chatllm

bool BaseTokenizer::is_terminate_token_id(int id) const
{
if (terminate_ids.size() < 1)
return id == eos_token_id;
if (id == eos_token_id) return true;

return terminate_ids.find(id) != terminate_ids.end();
}
Expand Down

0 comments on commit b52435a

Please sign in to comment.