Skip to content

Commit a39eac1

Browse files
committed
send partial stop string when <EOG> is reached
1 parent ad5c975 commit a39eac1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/server/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2360,7 +2360,7 @@ struct server_context {
23602360
slot.generated_text.begin() + pos + stop_pos,
23612361
slot.generated_text.end());
23622362
pos = std::min(slot.n_sent_text, slot.generated_text.size());
2363-
} else if (slot.has_next_token) {
2363+
} else if (slot.has_next_token && !llama_vocab_is_eog(vocab, result.tok) ) {
23642364
stop_pos = slot.find_stopping_strings(str_test, token_str.size(), false);
23652365
send_text = stop_pos == std::string::npos;
23662366
}

0 commit comments

Comments
 (0)