> This page is for version Latest (default).
> For other versions, use one of these documentation indexes:
> - Latest (default): https://docs.nvidia.com/cudnn/latest/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/cudnn/llms.txt.

# Sparse Attention

These pages describe attention APIs with selected tokens, blocks, or masks,
and related compression operations. The APIs are experimental and subject to change.

| API | Use |
| --- | --- |
| [Native Sparse Attention (NSA)](/cudnn/operations/sparse_attention/nsa) | Selection, compression, top-k, and sliding-window attention. |
| [DeepSeek Sparse Attention (DSA)](/cudnn/operations/sparse_attention/dsa) | Sparse attention and its indexer, score, and top-k operations. |
| [Simplified Sparse Attention](/cudnn/operations/sparse_attention/simplified_sparse_attention) | Packed attention with a trainable top-k indexer. |
| [Query Sparse Attention (QSA)](/cudnn/operations/sparse_attention/qsa) | Attention over selected four-token blocks, with bitmap and indexed training APIs. |
| [HSTU Attention](/cudnn/operations/sparse_attention/hstu_attention) | Masked attention for recommender models, with SiLU scores instead of softmax. |
| [HSTU LMSD](/cudnn/operations/sparse_attention/hstu_lmsd) | Fused layer normalization, multiplication, SiLU, and dropout. |
| [Block Sparse Attention (BSA)](/cudnn/operations/sparse_attention/bsa) | Attention over a caller-supplied block-sparse mask. |
| [CSA Fused Compressor](/cudnn/operations/sparse_attention/csa) | Compression for compressed sparse attention, with aligned HCA backward. |
| [Flex Attention](/cudnn/operations/sparse_attention/flex_attention) | Attention with reusable static-mask plans. |

See [Attention](/cudnn/operations/Attention) for scaled dot-product attention and
[Linear Attention](/cudnn/operations/LinearAttention) for recurrent attention APIs.