Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
f4d97e4f
Unverified
Commit
f4d97e4f
authored
Feb 12, 2025
by
bnellnm
Committed by
GitHub
Feb 12, 2025
Browse files
[Bug] [V1] Try fetching stop_reason from EngineOutput before checking the request (#13108)
parent
f1042e86
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
vllm/v1/engine/output_processor.py
vllm/v1/engine/output_processor.py
+6
-4
No files found.
vllm/v1/engine/output_processor.py
View file @
f4d97e4f
...
...
@@ -2,7 +2,7 @@
import
asyncio
from
dataclasses
import
dataclass
from
typing
import
Dict
,
List
,
Optional
from
typing
import
Dict
,
List
,
Optional
,
Union
from
vllm.outputs
import
RequestOutput
from
vllm.sampling_params
import
RequestOutputKind
...
...
@@ -164,6 +164,7 @@ class OutputProcessor:
new_token_ids
=
engine_core_output
.
new_token_ids
finish_reason
=
engine_core_output
.
finish_reason
stop_reason
=
engine_core_output
.
stop_reason
# TODO(andy): prompt logprobs + chunked prefill can
# result in engine core returning an output for a
...
...
@@ -181,9 +182,10 @@ class OutputProcessor:
# 2) Detokenize the token ids into text and check for stop
# strings.
stop_
reason
=
req_state
.
detokenizer
.
update
(
new_token_ids
)
if
stop_
reason
:
stop_
string
=
req_state
.
detokenizer
.
update
(
new_token_ids
)
if
stop_
string
and
finish_reason
!=
FinishReason
.
STOP
:
finish_reason
=
FinishReason
.
STOP
stop_reason
=
stop_string
# 3) Compute sample and prompt logprobs for request,
# if required.
...
...
@@ -250,7 +252,7 @@ class OutputProcessor:
request_state
:
RequestState
,
new_token_ids
:
List
[
int
],
finish_reason
:
Optional
[
FinishReason
],
stop_reason
:
Optional
[
str
],
stop_reason
:
Union
[
int
,
str
,
None
],
)
->
Optional
[
RequestOutput
]:
finished
=
finish_reason
is
not
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment