It’s basically a way of more efficiently making use of memory transfers during the calculation of the attention blocks in a transformer. You transfer a block at a time, increasing inference throughout because less time is spent overall fetching things from slow memory.
Yes. For a model within the limits of the head requirements, however, you wouldn’t be able to see a quality difference from regular attention. Non determinism is a performance price; regular transformers may also suffer from it depending on the implementation.
11 comments
[ 3.3 ms ] story [ 231 ms ] threadhttps://together.ai/blog/tri-dao-flash-attention
https://www.youtube.com/watch?v=J4-qZ6KBalk
FlashAttention-2, 2x faster than FlashAttention - https://news.ycombinator.com/item?id=36761988 - July 2023 (18 comments)
FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness - https://news.ycombinator.com/item?id=31568090 - May 2022 (3 comments)