1 parent 1a4091f commit 9f35cc6Copy full SHA for 9f35cc6
1 file changed
vllm_ascend/attention/attention_v1.py
@@ -619,14 +619,16 @@ def full_graph_fia(
619
input_layout = "TND"
620
attn_mask = attn_metadata.attn_mask
621
622
+ # next_tokens only takes effect when sparse_mode=4 (sliding window attention);
623
+ # for other sparse modes it is ignored, so we set it to 0 by default.
624
+ next_tokens = 0
625
if self.sliding_window is not None:
626
sparse_mode = 4
627
pre_tokens = self.sliding_window
- next_tokens = 0
628
+
629
else:
630
sparse_mode = 3 if attn_metadata.causal else 0
631
pre_tokens = SWA_INT_MAX
632
633
extra_args = {}
634
if self.enable_c8_quant:
0 commit comments