1980s
Tri Dao says memory-hierarchy-aware algorithm design dates to 1980s sorting problems, such as banks sorting transactions overnight.
“the motivating example was banks were trying to sort their transactions, and that needs to happen overnight so that the next day they can be ready.”
Tri Dao · FlashAttention 2: making Transformers 800% faster w/o approximation - with Tri Dao of Together AI, 0:12:25
2022
FlashAttention gave wall-clock speedups of roughly two to four times without approximating attention, according to Tri Dao.
“we do get walk-lock speed up on the order of two to four X”
Tri Dao · FlashAttention 2: making Transformers 800% faster w/o approximation - with Tri Dao of Together AI, 0:02:50
2023
Tri Dao became chief scientist at Together, the company behind RedPajama, in the week of the recording.
“you're a chief scientist at Together as well, which is the company behind the RedPajama.”
Alessio Fanelli · FlashAttention 2: making Transformers 800% faster w/o approximation - with Tri Dao of Together AI, 0:00:39
2023
Tri Dao was due to become an assistant professor of computer science at Princeton the following year.
“And now you're going to be an assistant professor in CS at Princeton next year.”
Alessio Fanelli · FlashAttention 2: making Transformers 800% faster w/o approximation - with Tri Dao of Together AI, 0:00:39
2023
FlashAttention 2 is about twice as fast as the original and, per Tri Dao, close to the efficiency of matrix multiplication.
“we managed to make it 2x faster. And now it's pretty close to probably the efficiency of things like Matrix Multiply”
Tri Dao · FlashAttention 2: making Transformers 800% faster w/o approximation - with Tri Dao of Together AI, 0:28:13
2023
Alex Zhang says Tri Dao gave a talk on FlashAttention at Princeton around 2023, while applying for faculty, which got him interested in GPU programming.
“a talk at Princeton because he was applying for faculty I mean he is faculty there now but I listened to his talk on Flash Tension in like 2023”
Alex Zhang · Academia is for Ambition — Alex Zhang, MIT, 0:04:45
Said Jul 2023
Tri Dao started college intending to study economics but switched to a math major during his first week as a Stanford undergraduate.
“the first week I was at Stanford undergrad. I took a few math classes and I immediately decided that I was going to be a math major”
Tri Dao · FlashAttention 2: making Transformers 800% faster w/o approximation - with Tri Dao of Together AI, 0:01:09
Said Jul 2023
Tri Dao says approximate attention methods perform fewer operations but tend not to run faster in wall-clock time.
“these approximation methods, even though they perform fewer computation, they tend to not be faster in walk-on-tap.”
Tri Dao · FlashAttention 2: making Transformers 800% faster w/o approximation - with Tri Dao of Together AI, 0:04:11
Said Jul 2023
Tri Dao says most of the time in attention goes to reading and writing memory, which is why FlashAttention targeted memory traffic.
“we ended up focusing a lot more on memory reading and writing because that turned out to be the majority of time when you're doing attention is reading and writing memory.”
Tri Dao · FlashAttention 2: making Transformers 800% faster w/o approximation - with Tri Dao of Together AI, 0:05:16
Said Jul 2023
Transformers keep earlier tokens in a KV cache during generation, which uses large amounts of memory and limits batch size, according to Tri Dao.
“It's called the KV cache. And that could take a significant amount of memory. So you can't really batch too much because you run out of memory.”
Tri Dao · FlashAttention 2: making Transformers 800% faster w/o approximation - with Tri Dao of Together AI, 0:41:33