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
372bf089
Unverified
Commit
372bf089
authored
Jan 27, 2025
by
Isotr0py
Committed by
GitHub
Jan 27, 2025
Browse files
[Bugfix] Fix missing seq_start_loc in xformers prefill metadata (#12464)
Signed-off-by:
Isotr0py
<
2037008807@qq.com
>
parent
5204ff5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
vllm/attention/backends/xformers.py
vllm/attention/backends/xformers.py
+3
-0
No files found.
vllm/attention/backends/xformers.py
View file @
372bf089
...
@@ -199,6 +199,8 @@ class XFormersMetadata(AttentionMetadata, PagedAttentionMetadata):
...
@@ -199,6 +199,8 @@ class XFormersMetadata(AttentionMetadata, PagedAttentionMetadata):
# Compute some attn_metadata fields which default to None
# Compute some attn_metadata fields which default to None
query_start_loc
=
(
None
if
self
.
query_start_loc
is
None
else
query_start_loc
=
(
None
if
self
.
query_start_loc
is
None
else
self
.
query_start_loc
[:
self
.
num_prefills
+
1
])
self
.
query_start_loc
[:
self
.
num_prefills
+
1
])
seq_start_loc
=
(
None
if
self
.
seq_start_loc
is
None
else
self
.
seq_start_loc
[:
self
.
num_prefills
+
1
])
slot_mapping
=
(
None
if
self
.
slot_mapping
is
None
else
slot_mapping
=
(
None
if
self
.
slot_mapping
is
None
else
self
.
slot_mapping
[:
self
.
num_prefill_tokens
])
self
.
slot_mapping
[:
self
.
num_prefill_tokens
])
seq_lens
=
(
None
if
self
.
seq_lens
is
None
else
seq_lens
=
(
None
if
self
.
seq_lens
is
None
else
...
@@ -225,6 +227,7 @@ class XFormersMetadata(AttentionMetadata, PagedAttentionMetadata):
...
@@ -225,6 +227,7 @@ class XFormersMetadata(AttentionMetadata, PagedAttentionMetadata):
max_prefill_seq_len
=
self
.
max_prefill_seq_len
,
max_prefill_seq_len
=
self
.
max_prefill_seq_len
,
max_decode_seq_len
=
0
,
max_decode_seq_len
=
0
,
query_start_loc
=
query_start_loc
,
query_start_loc
=
query_start_loc
,
seq_start_loc
=
seq_start_loc
,
context_lens_tensor
=
context_lens_tensor
,
context_lens_tensor
=
context_lens_tensor
,
block_tables
=
block_tables
,
block_tables
=
block_tables
,
use_cuda_graph
=
False
,
use_cuda_graph
=
False
,
...
...
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