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
acdbc978
Commit
acdbc978
authored
Dec 03, 2024
by
王敏
Browse files
[fix]修复llm_engine.py 越界报错
parent
6ebda263
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
vllm/engine/llm_engine.py
vllm/engine/llm_engine.py
+10
-9
No files found.
vllm/engine/llm_engine.py
View file @
acdbc978
...
...
@@ -989,15 +989,16 @@ class LLMEngine:
output
=
[
outputs_by_sequence_group
[
0
][
i
]]
# tree style speculative decoding may generate empty output in first step
if
outputs
and
isinstance
(
output
[
0
],
CompletionSequenceGroupOutput
):
samples
=
[
o
.
samples
[
0
]
for
o
in
output
]
valid_samples
=
[
sample
for
sample
in
samples
if
sample
.
output_token
!=
VLLM_INVALID_TOKEN_ID
]
if
len
(
valid_samples
)
==
0
:
empty_seq_indices
.
append
(
i
)
continue
if
self
.
speculative_config
and
self
.
speculative_config
.
tree_style_spec_decoding
:
if
outputs
and
isinstance
(
output
[
0
],
CompletionSequenceGroupOutput
):
samples
=
[
o
.
samples
[
0
]
for
o
in
output
]
valid_samples
=
[
sample
for
sample
in
samples
if
sample
.
output_token
!=
VLLM_INVALID_TOKEN_ID
]
if
len
(
valid_samples
)
==
0
:
empty_seq_indices
.
append
(
i
)
continue
if
not
is_async
:
seq_group
.
update_num_computed_tokens
(
...
...
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