From 6b5296aa3ae632b8f2dcbc78579eb41b28e41068 Mon Sep 17 00:00:00 2001 From: Zhuohan Li Date: Sun, 8 Oct 2023 15:22:38 -0700 Subject: [PATCH] [FIX] Explain why the finished_reason of ignored sequences are length (#1289) --- vllm/sequence.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vllm/sequence.py b/vllm/sequence.py index 4f0adac743c36..942cf9ecec80e 100644 --- a/vllm/sequence.py +++ b/vllm/sequence.py @@ -35,6 +35,9 @@ class SequenceStatus(enum.Enum): elif status == SequenceStatus.FINISHED_ABORTED: finish_reason = "abort" 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" else: finish_reason = None