SageAttention
Tsinghua Machine Learning GroupSageAttention is a quantized attention implementation that replaces the attention operator with 8-bit and INT4 arithmetic, using outlier smoothing and per-thread quantization to hold accuracy. It is applied as a drop-in substitution in language, image and video models, and the repository carries the SageAttention, SageAttention2 and SageAttention2++ implementations described in the papers.
Openness
5 high confidence- license
- Apache-2.0(OSI)
- source
- public
- core features withheld
- no
The LICENSE file contains the Apache-2.0 text. The repository is public and the README describes no paid tier, enterprise edition or license-gated build, so the core is ungated.
- https://raw.githubusercontent.com/thu-ml/SageAttention/main/LICENSE recorded 2026-09-30
LICENSE file is the verbatim Apache-2.0 text, opening with "Apache License" and "Version 2.0, January 2004" and "TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION".
- https://raw.githubusercontent.com/thu-ml/SageAttention/main/README.md recorded 2026-09-30
README says "This repository provides the official implementation of SageAttention, SageAttention2, and SageAttention2++" and installs with "pip install sageattention==2.2.0 --no-build-isolation" or by compiling from source with "python setup.py install". Searched the body for enterprise, license key, paid, commercial, proprietary and non-commercial: none.
- https://raw.githubusercontent.com/thu-ml/SageAttention/main/setup.py recorded 2026-09-30
setup.py builds the CUDA extensions from the repository with torch CUDAExtension and nvcc, with "CUDA 12.0 or higher is required to build the package." Searched the body for enterprise, license key, paid, commercial and proprietary: none.
Adoption
3 high confidenceAdoption is measured from PyPI downloads of the `sageattention` package.
- https://pypistats.org/api/packages/sageattention/recent recorded 2026-08-18
last_month downloads = 209,877 for sageattention
Capability
3 medium confidenceSageAttention replaces the attention operator with quantized 8-bit and INT4 kernels, with SageAttention3 adding microscaling FP4 kernels for Blackwell, applied as a drop-in substitution across language, image and video models. It is one operator family across four GPU architectures, which places it one step below TensorRT.
- https://raw.githubusercontent.com/thu-ml/SageAttention/main/README.md recorded 2026-09-30
README lists "Optmized kernels for **Ampere, Ada and Hopper GPUs.**" and "INT8 quantization and smoothing for $QK^\top$ with support for varying granularities." and "Support `torch.compile` with non-cudagraphs mode and distributed inference."
- https://raw.githubusercontent.com/thu-ml/SageAttention/main/README.md recorded 2026-09-30
README describes attention as a plug-and-play speedup and documents the API "`sageattn`: Automatically selects the optimal kernel based on the GPU to achieve a good performance-accuracy trade-off." with `sageattn_varlen` for variable sequence lengths.
Verified 2026-09-24