Skip to content

Commit 66e95c6

Browse files
committed
refact attn metadata build
Signed-off-by: weiguihua2 <[email protected]>
1 parent 511de2f commit 66e95c6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

vllm_ascend/attention/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from dataclasses import dataclass
2-
from typing import Any
2+
from typing import Any, Optional
33

44
import torch
55

@@ -36,7 +36,7 @@ class AscendCommonAttentionMetadata:
3636

3737
slot_mapping_cpu: torch.Tensor
3838

39-
actual_seq_lengths_q: list[int] = None
39+
actual_seq_lengths_q: Optional[list[int]] = None
4040

4141
positions: torch.Tensor = None
4242

@@ -70,7 +70,7 @@ class TorchairCommonAttentionMetadata:
7070

7171
decode_token_per_req: int
7272

73-
actual_seq_lengths_q: list[int] = None
73+
actual_seq_lengths_q: Optional[list[int]] = None
7474

7575
attn_mask: torch.Tensor = None
7676

vllm_ascend/worker/model_runner_v1.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,6 @@ def get_eagle_atten_dict(
812812
attn_mask=self.attn_mask,
813813
spec_attn_mask=self.spec_attn_mask,
814814
attn_state=self.attn_state,
815-
max_num_blocks_per_req=self.max_num_blocks_per_req,
816815
decode_token_per_req=self.decode_token_per_req,
817816
)
818817
attn_metadata_i = self.attn_metadata_builder.build(

0 commit comments

Comments
 (0)