Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norm
vllm
Commits
54d35447
Unverified
Commit
54d35447
authored
Mar 01, 2024
by
Sherry
Committed by
GitHub
Mar 01, 2024
Browse files
Fix: Output text is always truncated in some models (#3016)
parent
703e42ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
vllm/engine/llm_engine.py
vllm/engine/llm_engine.py
+4
-1
No files found.
vllm/engine/llm_engine.py
View file @
54d35447
...
...
@@ -980,7 +980,10 @@ class LLMEngine:
def
_finalize_sequence
(
self
,
seq
:
Sequence
,
sampling_params
:
SamplingParams
,
stop_string
:
str
)
->
None
:
if
not
sampling_params
.
include_stop_str_in_output
and
stop_string
:
if
sampling_params
.
include_stop_str_in_output
:
return
if
stop_string
and
seq
.
output_text
.
endswith
(
stop_string
):
# Truncate the output text so that the stop string is
# not included in the output.
seq
.
output_text
=
seq
.
output_text
[:
-
len
(
stop_string
)]
...
...
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