Skip to content

Commit

Permalink
Fill TorchSDPAAttentionMetadata seq_lens_field for prefill (#10799)
Browse files Browse the repository at this point in the history
Signed-off-by: Max de Bayser <[email protected]>
  • Loading branch information
maxdebayser authored Dec 2, 2024
1 parent 073a4bd commit e25810a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vllm/attention/backends/torch_sdpa.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,11 @@ def build(self, seq_lens: List[int], query_lens: List[int],
)
else:
block_tables = torch.tensor([])
seq_lens_tensor = torch.tensor([])
seq_lens_tensor = torch.tensor(
input_data.seq_lens[:input_data.num_prefills],
dtype=torch.int32,
device="cpu",
)

# For multi-modal models
placeholder_index_maps = None
Expand Down

0 comments on commit e25810a

Please sign in to comment.