[Bugfix][DSv4.1] Fix FlashInfer DSpark non-causal attention (#57432)

Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Woosuk Kwon
2026-09-17 15:14:37 -07:00
committed by GitHub
co-authored by Codex
parent d3074acdda
commit 80447d2765
3 changed files with 214 additions and 6 deletions
@@ -205,6 +205,8 @@ class DeepseekSparseSWAMetadata:
num_decode_tokens: int = 0
num_prefill_tokens: int = 0
max_decode_query_len: int = 1
flashinfer_decode_topk_lens: torch.Tensor | None = None
flashinfer_decode_seq_lens: torch.Tensor | None = None
# Pre-computed prefill metadata shared across all DeepseekV4 attention layers.
prefill_seq_lens: torch.Tensor | None = None