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
feb92fbe
"tests/entrypoints/pooling/llm/__init__.py" did not exist on "e575df33b1963212f79b2efddd45d53225fa5c45"
Unverified
Commit
feb92fbe
authored
Oct 28, 2024
by
Robert Shaw
Committed by
GitHub
Oct 28, 2024
Browse files
Fix beam search eos (#9627)
parent
32176fee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
vllm/engine/protocol.py
vllm/engine/protocol.py
+6
-1
No files found.
vllm/engine/protocol.py
View file @
feb92fbe
...
...
@@ -140,7 +140,12 @@ class EngineClient(ABC):
best_beams
=
sorted_completed
[:
beam_width
]
for
beam
in
best_beams
:
beam
.
text
=
tokenizer
.
decode
(
beam
.
tokens
[
tokenized_length
:])
if
(
beam
.
tokens
[
-
1
]
==
tokenizer
.
eos_token_id
and
not
ignore_eos
):
# Skip the eos token in the text.
tokens
=
beam
.
tokens
[
tokenized_length
:
-
1
]
else
:
tokens
=
beam
.
tokens
[
tokenized_length
:]
beam
.
text
=
tokenizer
.
decode
(
tokens
)
beam_search_output
=
RequestOutput
(
request_id
=
request_id
,
...
...
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