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
"ssh:/git@developer.sourcefind.cn:2222/OpenDAS/vllm_cscc.git" did not exist on "042da732445f5cef93cb83e1045333544e61a0a1"
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:
...
@@ -989,15 +989,16 @@ class LLMEngine:
output
=
[
outputs_by_sequence_group
[
0
][
i
]]
output
=
[
outputs_by_sequence_group
[
0
][
i
]]
# tree style speculative decoding may generate empty output in first step
# tree style speculative decoding may generate empty output in first step
if
outputs
and
isinstance
(
output
[
0
],
CompletionSequenceGroupOutput
):
if
self
.
speculative_config
and
self
.
speculative_config
.
tree_style_spec_decoding
:
samples
=
[
o
.
samples
[
0
]
for
o
in
output
]
if
outputs
and
isinstance
(
output
[
0
],
CompletionSequenceGroupOutput
):
valid_samples
=
[
samples
=
[
o
.
samples
[
0
]
for
o
in
output
]
sample
for
sample
in
samples
valid_samples
=
[
if
sample
.
output_token
!=
VLLM_INVALID_TOKEN_ID
sample
for
sample
in
samples
]
if
sample
.
output_token
!=
VLLM_INVALID_TOKEN_ID
if
len
(
valid_samples
)
==
0
:
]
empty_seq_indices
.
append
(
i
)
if
len
(
valid_samples
)
==
0
:
continue
empty_seq_indices
.
append
(
i
)
continue
if
not
is_async
:
if
not
is_async
:
seq_group
.
update_num_computed_tokens
(
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