Skip to content
PyRank
  • Search
  • PyPI
  • GitHub
  • Insights
  • Compare
  • Advisories
  • Ecosystem
  • About

Sparse Attention Python Packages

Python packages with the GitHub topic sparse-attention. Sorted by monthly downloads, with stars and forks.
SHI-Labs
natten

Fast Multi-dimensional Sparse Attention

26K 820 71
lucidrains
native-sparse-attention-pytorch

Native Sparse Attention

2K 817 51
dliptak001
hypercube-hopfield

Modern Hopfield associative memory on a hypercube graph. Sparse local-attention retrieval with exponential capacity. C++23 and Python SDKs.

2K 1 0
hebo1221
nano-deepseek-v4

A compact, readable PyTorch reference implementation of the DeepSeek-V4 architecture (Flash and Pro), in the spirit of nanoGPT. ~4,300 LOC.

428 19 7
HKUSTDial
flash-sparse-attn

Trainable fast and memory-efficient sparse attention

309 753 55
hpdic
certex

Exact k-nearest-neighbor search on NVIDIA GPUs by certified exclusion

305 0 0
SmallDoges
flash-dmattn

Flash Dynamic Mask Attention: Fast and Memory-Efficient Trainable Dynamic Mask Sparse Attention

129 751 55
PardisTaghavi
sparsepr

Training-free sparse-attention acceleration for video diffusion and world models

76 1 0
bytedance
shadowkv

shadow kv cache

59 318 27
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology