#423423rd of 433 in ML frameworks and libraries
spargeattn
Training-free sparse attention CUDA kernels, a drop-in for PyTorch SDPA
Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.
Watch puts spargeattn on your watch list: its new releases and known problems since your last visit. Kept in this browser, no account.spargeattn is on your watch list. Its new releases and problems show there.
- Stars
- 1.3k
- License
- Apache-2.0
- Last commit
- Feb 2026
- Language
- Cuda
986 on 7 May 20261,269 on 26 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
SpargeAttn is the official implementation of a training-free sparse attention method built on SageAttention quantized kernels. It provides a drop-in replacement for torch.nn.functional.scaled_dot_product_attention with a top-k sparsity parameter, plus a block-sparse API that takes a per-head 0/1 mask at 128x64 block size. It targets faster inference of language, image and video models on NVIDIA GPUs.
Who it is for: Engineers speeding up LLM or diffusion inference on NVIDIA GPUs
Strengths
- Drop-in replacement for scaled_dot_product_attention with a single topk parameter
- Block-sparse API accepts an arbitrary per-head mask
- Recommended API needs no tuning or calibration
- Variants based on SageAttention and SageAttention2; covers Ampere, Ada, Hopper, Blackwell
Weaknesses
- Must be built from source with ninja; no prebuilt release
- NVIDIA CUDA only; needs CUDA 12.0+ and torch 2.3+
- Block size is fixed at 128x64
- Model examples and tuned checkpoints are commented out of the README
What it needs
- GPU required
- Needs python>=3.9, torch>=2.3.0, CUDA>=12.0, ninja
- Models: language models, image models, video models
Also in ML frameworks and libraries
See all 433| Rank | Project | Score |
|---|---|---|
| #421 | jeelizfacefilterWebGL face detection and head-pose tracking from webcam video, for AR filters | 13 out of 100 |
| #422 | metric-learnscikit-learn-compatible Python library of metric learning algorithms | 13 out of 100 |
| #424 | pyldavisInteractive visualization of fitted LDA topic models in Python notebooks | 12 out of 100 |
| #425 | pfrlPyTorch library of deep RL algorithms such as DQN, PPO, SAC and TD3 | 11 out of 100 |
| #426 | pygamGeneralized Additive Models in Python with a scikit-learn-style API | 10 out of 100 |