Skip to content

Commit

Permalink
[Fix] Split if and only if complete eos string shows up (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leymore authored Oct 13, 2023
1 parent 861942a commit 7d9e386
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opencompass/tasks/openicl_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def _extract_role_pred(self, s: str, begin_str: Optional[str],
if end_str:
# TODO: Support calling tokenizer for the accurate eos token
# and avoid such hardcode
end_idx = s.find(end_str[:1], start)
end_idx = s.find(end_str, start)
if end_idx != -1:
end = end_idx

Expand Down

0 comments on commit 7d9e386

Please sign in to comment.