Skip to content

Commit

Permalink
Update stop_checker.py
Browse files Browse the repository at this point in the history
Signed-off-by: Xu Song <xusong.vip@gmail.com>
  • Loading branch information
xu-song committed Feb 15, 2025
1 parent 949c228 commit 2414c63
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 2414c63

Please sign in to comment.