Skip to content

Commit

Permalink
Update stop_checker.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xu-song authored Feb 15, 2025
1 parent 2b07da3 commit 4d93adf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vllm/engine/output_processor/stop_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ def check_stop_strings(
for stop_str in stop:
stop_string_len = len(stop_str)
# Avoid searching already-searched text.
stop_index = output_text.find(stop_str,
len(output_text) - new_char_count - stop_string_len + 1)
stop_index = output_text.find(stop_str, 1 - new_char_count - stop_string_len)
if stop_index == -1:
continue

Expand Down

0 comments on commit 4d93adf

Please sign in to comment.