Unverified Commit 6b5296aa authored by Zhuohan Li's avatar Zhuohan Li Committed by GitHub
Browse files

[FIX] Explain why the finished_reason of ignored sequences are length (#1289)

parent ee92b58b
...@@ -35,6 +35,9 @@ class SequenceStatus(enum.Enum): ...@@ -35,6 +35,9 @@ class SequenceStatus(enum.Enum):
elif status == SequenceStatus.FINISHED_ABORTED: elif status == SequenceStatus.FINISHED_ABORTED:
finish_reason = "abort" finish_reason = "abort"
elif status == SequenceStatus.FINISHED_IGNORED: elif status == SequenceStatus.FINISHED_IGNORED:
# The ignored sequences are the sequences whose prompt lengths
# are longer than the model's length cap. Therefore, the stop
# reason should also be "length" as in OpenAI API.
finish_reason = "length" finish_reason = "length"
else: else:
finish_reason = None finish_reason = None
......
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