Skip to content

Commit ff6dd4a

Browse files
committed
Also stop generation on <|eom_id|>
1 parent d8bf5f4 commit ff6dd4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nemo/collections/nlp/modules/common/text_generation_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def chat_completion(self, data):
213213
time.sleep(0.5) # process one batch every 0.5s
214214
else:
215215
queryid = 0
216-
end_strings = ['<|endoftext|>']
216+
end_strings = ['<|endoftext|>', "<|eom_id|>"]
217217
for special_key in [
218218
# Currently this is hardcoded for the Llama3 template, where only 'end_of_turn' matters.
219219
# Ideally `end_strings` should be in the model config, because we can't know for sure

0 commit comments

Comments
 (0)