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
4b59f00e
"vllm/vscode:/vscode.git/clone" did not exist on "84f6cd741b591c780b6f5ac9be05413fd50812db"
Unverified
Commit
4b59f00e
authored
Mar 10, 2024
by
Nick Hill
Committed by
GitHub
Mar 10, 2024
Browse files
[Fix] Fix best_of behavior when n=1 (#3298)
parent
9e8744a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vllm/outputs.py
vllm/outputs.py
+3
-3
No files found.
vllm/outputs.py
View file @
4b59f00e
...
@@ -87,12 +87,12 @@ class RequestOutput:
...
@@ -87,12 +87,12 @@ class RequestOutput:
@
classmethod
@
classmethod
def
from_seq_group
(
cls
,
seq_group
:
SequenceGroup
)
->
"RequestOutput"
:
def
from_seq_group
(
cls
,
seq_group
:
SequenceGroup
)
->
"RequestOutput"
:
# Get the top-n sequences.
n
=
seq_group
.
sampling_params
.
n
seqs
=
seq_group
.
get_seqs
()
seqs
=
seq_group
.
get_seqs
()
if
n
==
1
:
if
len
(
seqs
)
==
1
:
top_n_seqs
=
seqs
top_n_seqs
=
seqs
else
:
else
:
# Get the top-n sequences.
n
=
seq_group
.
sampling_params
.
n
if
seq_group
.
sampling_params
.
use_beam_search
:
if
seq_group
.
sampling_params
.
use_beam_search
:
sorting_key
=
lambda
seq
:
seq
.
get_beam_search_score
(
sorting_key
=
lambda
seq
:
seq
.
get_beam_search_score
(
seq_group
.
sampling_params
.
length_penalty
)
seq_group
.
sampling_params
.
length_penalty
)
...
...
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