[Fix] Fix several bugs on DSA models (#22430)

This commit is contained in:
Baizhou Zhang
2026-04-09 12:46:23 -07:00
committed by GitHub
parent 606aa11ea8
commit 60acdc31f2
2 changed files with 5 additions and 5 deletions
@@ -2129,11 +2129,9 @@ class NativeSparseAttnBackend(
# disable for MTP
self.nsa_kv_cache_store_fp8
and self.nsa_prefill_impl == "flashmla_sparse"
and forward_mode == ForwardMode.EXTEND
):
topk_transform_method = TopkTransformMethod.RAGGED
if forward_mode is not None and (forward_mode.is_decode_or_idle()):
topk_transform_method = TopkTransformMethod.PAGED
else:
topk_transform_method = TopkTransformMethod.PAGED
return topk_transform_method
+4 -2
View File
@@ -1491,8 +1491,10 @@ class ServerArgs:
self.nsa_decode_backend = "tilelang"
elif kv_cache_dtype == "fp8_e4m3":
if major >= 10:
self.nsa_prefill_backend = "trtllm"
self.nsa_decode_backend = "trtllm"
if not user_set_prefill:
self.nsa_prefill_backend = "trtllm"
if not user_set_decode:
self.nsa_decode_backend = "trtllm"
else:
# flashmla_auto dispatches to flashmla_sparse/flashmla_kv based on hardware and heuristics
if not user_set_prefill: