Unverified Commit 7d9e3868 authored by Leymore's avatar Leymore Committed by GitHub
Browse files

[Fix] Split if and only if complete eos string shows up (#477)

parent 861942ab
...@@ -207,7 +207,7 @@ class OpenICLEvalTask(BaseTask): ...@@ -207,7 +207,7 @@ class OpenICLEvalTask(BaseTask):
if end_str: if end_str:
# TODO: Support calling tokenizer for the accurate eos token # TODO: Support calling tokenizer for the accurate eos token
# and avoid such hardcode # and avoid such hardcode
end_idx = s.find(end_str[:1], start) end_idx = s.find(end_str, start)
if end_idx != -1: if end_idx != -1:
end = end_idx end = end_idx
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment