Show HN: Flash Attention in ~100 lines of CUDA
1–10 of 44 posts
Re: Show HN: Flash Attention in ~100 lines of CUDA
#2Re: Show HN: Flash Attention in ~100 lines of CUDA
#3Discussing: Transformer [1] memory issues and approximate attention [2] in machine learning training.
Specifically: FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness. [3]
As a side comment, this entire industry is sorely in need of at least intros. The entire space has moved so fast in the last year I need an entire new dictionary and thesaurus for all the terms they've created. Notably, because of this, found out Google has a glossary of machine learning terms. Actually somewhat handy.
[1] Google Machine Learning Glossary (Transformer): https://developers.google.com/machine-learning/glossary/#tra...
[2] Same (Attention): https://developers.google.com/machine-learning/glossary/#att...
[2] arXiv: https://arxiv.org/abs/2205.14135
Re: Show HN: Flash Attention in ~100 lines of CUDA
#4Pretty neat implementation. In general, for these sort of exercises (and even if the intention is to go to prod with custom kernels) I lean towards Triton to write the kernels themselves. It is much more easier to integrate to the tool chain, and allows a level of abstraction that doesn't affect performance even a little bit while providing useful constructs.
Re: Show HN: Flash Attention in ~100 lines of CUDA
#5Pretty neat implementation. In general, for these sort of exercises (and even if the intention is to go to prod with custom kernels) I lean towards Triton to write the kernels themselves. It is much more easier to integrate to the tool chain, and allows a level of abstraction that doesn't affect performance even a little bit while providing useful constructs.
You mean triton the inference server or triton the DSL for cuda?
Re: Show HN: Flash Attention in ~100 lines of CUDA
#6Pretty neat implementation. In general, for these sort of exercises (and even if the intention is to go to prod with custom kernels) I lean towards Triton to write the kernels themselves. It is much more easier to integrate to the tool chain, and allows a level of abstraction that doesn't affect performance even a little bit while providing useful constructs.
You mean triton the inference server or triton the DSL for cuda?
Re: Show HN: Flash Attention in ~100 lines of CUDA
#7Pretty neat implementation. In general, for these sort of exercises (and even if the intention is to go to prod with custom kernels) I lean towards Triton to write the kernels themselves. It is much more easier to integrate to the tool chain, and allows a level of abstraction that doesn't affect performance even a little bit while providing useful constructs.
Re: Show HN: Flash Attention in ~100 lines of CUDA
#8Re: Show HN: Flash Attention in ~100 lines of CUDA
#9For those who have no idea what's being discussed, quick background. Discussing: Transformer [1] memory issues and approximate attention [2] in machine learning training. Specifically: FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness. [3] As a side comment, this entire industry is sorely in need of at least intros. The entire space has moved so fast in the last year I need an entire new dic…
Re: Show HN: Flash Attention in ~100 lines of CUDA
#10For those who have no idea what's being discussed, quick background. Discussing: Transformer [1] memory issues and approximate attention [2] in machine learning training. Specifically: FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness. [3] As a side comment, this entire industry is sorely in need of at least intros. The entire space has moved so fast in the last year I need an entire new dic…