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
93089fb2
Commit
93089fb2
authored
Nov 20, 2024
by
王敏
Browse files
[fix]修复单测test_encoder_decoder_model_runner报错问题
parent
4e23f2ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
vllm/worker/model_runner.py
vllm/worker/model_runner.py
+5
-4
No files found.
vllm/worker/model_runner.py
View file @
93089fb2
...
...
@@ -855,11 +855,12 @@ class ModelInputForGPUBuilder(ModelRunnerInputBuilderBase[ModelInputForGPU]):
tree_attention_masks_list
=
[]
for
inter_data
in
self
.
inter_data_list
:
for
i
in
range
(
len
(
inter_data
.
seq_lens
)):
if
inter_data
.
tree_attn_masks
:
tree_attn_masks
=
inter_data
.
tree_attn_masks
[
i
]
if
tree_attn_masks
is
not
None
:
tree_attention_masks_list
.
append
(
tree_attn_masks
)
tree_attention_masks_tensor
=
None
if
len
(
tree_attention_masks_list
)
>
0
:
if
tree_attention_masks_list
:
tree_attention_masks_tensor
=
torch
.
stack
(
tree_attention_masks_list
,
dim
=
0
)
tree_attention_masks_tensor
=
tree_attention_masks_tensor
.
contiguous
()
...
...
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