ThunderKittens: Simple, Fast, and Adorable AI Kernels
The DOI matches its DataCite record; 8 of the 8 references it cites were found in a registry or an index.
Abstract
The challenge of mapping AI architectures to GPU hardware is creating a critical bottleneck in AI progress. Despite substantial efforts, hand-written custom kernels fail to meet their theoretical performance thresholds, even on well-established operations like linear attention. The diverse hardware capabilities of GPUs might suggest that we need a wide variety of techniques to achieve high performance. However, our work explores whether a small number of key abstractions can drastically simplify the process. We present ThunderKittens (TK), a framework for writing performant AI kernels while remaining easy to use and maintain. Our abstractions map to the three levels of the GPU hierarchy: (1) at the warp-level, we provide 16x16 matrix tiles as basic data structures and PyTorch-like parallel compute operations over tiles, (2) at the thread-block level, we provide a template for overlapping asynchronous operations across parallel warps, and (3) at the grid-level, we provide support to help hide the block launch and tear-down, and memory costs. We show the value of TK by providing kernels that match or outperform prior kernels for a range of AI operations. We match CuBLAS and FlashAttention-3 on GEMM and attention inference performance and outperform the strongest baselines by $10-40\%$ on attention backwards, $8\times$ on state space models, and $14\times$ on linear attention.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
TVM: an automated end-to-end optimizing compiler for deep learning
(2018) · arXiv (Cornell University) · doi:10.5555/3291168.3291211 · Cited by 1,170
(2013) · doi:10.1145/2491956.2462176 · Cited by 885
Efficiently Modeling Long Sequences with Structured State Spaces
Gu, A., Goel, K., & Ré, C. (2021) · arXiv · doi:10.48550/arxiv.2111.00396 · Cited by 805
Self-citationTensor Comprehensions: Framework-Agnostic High-Performance Machine Learning Abstractions
Vasilache, N., Zinenko, O., Theodoridis, T., Goyal, P., DeVito, Z., Moses, W. S., Verdoolaege, S., Adams, A., & Cohen, A. (2018) · arXiv · doi:10.48550/arxiv.1802.04730 · Cited by 548
Glow: Graph Lowering Compiler Techniques for Neural Networks
Rotem, N., Fix, J., Abdulrasool, S., Catron, G., Deng, S., Dzhabarov, R., Gibson, N., Hegeman, J., Lele, M., Levenstein, R., et al. (2018) · arXiv · doi:10.48550/arxiv.1805.00907 · Cited by 407
Triton: an intermediate language and compiler for tiled neural network computations
Tillet, P., Kung, H. T., & Cox, D. (2019) · Proceedings of the 3rd ACM SIGPLAN International Workshop on Machine Learning and Programming Languages · doi:10.1145/3315508.3329973 · Cited by 318 · cited 3×
“We are inspired by a number of related efforts to simplify the development of AI kernels, such as NVIDIA CUTLASS/CuTe [29] and Triton [39].”
BackgroundMethodHyena Hierarchy: Towards Larger Convolutional Language Models
Poli, M., Massaroli, S., Nguyen, E., Fu, D. Y., Dao, T., Baccus, S., Bengio, Y., Ermon, S., & Ré, C. (2023) · arXiv · doi:10.48550/arxiv.2302.10866 · Cited by 96 · cited 1×
“• State space models The long convolution, implemented with Fourier transforms using the convolution theorem, is the key primitive in popular state space modeling architectures such as S4, H3, and Hyena [2, 19, 22, 23, 33, inter alia.].”
MethodSelf-citationPolySketchFormer: Fast Transformers via Sketching Polynomial Kernels
Kacham, P., Mirrokni, V., & Zhong, P. (2023) · arXiv · doi:10.48550/arxiv.2310.01655 · Cited by 2
Cited by
KernelBench: Can LLMs Write Efficient GPU Kernels?
Ouyang, A., Guo, S., Arora, S., Zhang, A. L., Hu, W., Ré, C., & Mirhoseini, A. (2025) · arXiv · doi:10.48550/arxiv.2502.10517 · Cited by 2
“They can use programming tools ranging from assembly (e.g., PTX as in DeepSeek-AI [9]) to higher-level libraries (ThunderKittens [32], Triton [36]).”
Self-citation
Metadata
- Authors
- Spector, B. F., Arora, S., Singhal, A., Fu, D. Y., & Ré, C.
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2024
- arXiv
- 2410.20399
- References
- 8
- Type
- Preprint
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.