mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
[Fix] Split if and only if complete eos string shows up (#477)
This commit is contained in:
parent
861942ab1b
commit
7d9e386821
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user