Earlier quoted context omitted.
The actual mechanism at least is quite simple. Essentially it takes the FFT of the input embeddings, multiplies it elementwise with weights that are gotten from the input embeddings using an MLP (plus a constant (but learnable) bias) and then runs it through an activation function and finally takes the inverse FFT. The "frequencies" are probably something quite abstract. FFT is often used in ways where there aren't r…
Essentially leveraging Convolution theorem. Same philosophy pops up in many places, e.g. DFT calculations
The FFT Strikes Back: An Efficient Alternative to Self-Attention
21–30 of 175 posts
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#221. traditional Self-Attention;
2. Flash-Attention?
3. Any novel others?
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#23Earlier quoted context omitted.
The actual mechanism at least is quite simple. Essentially it takes the FFT of the input embeddings, multiplies it elementwise with weights that are gotten from the input embeddings using an MLP (plus a constant (but learnable) bias) and then runs it through an activation function and finally takes the inverse FFT. The "frequencies" are probably something quite abstract. FFT is often used in ways where there aren't r…
Essentially leveraging Convolution theorem. Same philosophy pops up in many places, e.g. DFT calculations
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#24Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#25Can someone confirm the big O time complexities of 1. traditional Self-Attention; 2. Flash-Attention? 3. Any novel others?
In other words, optimizes practical runtime through I/O reduction without altering asymptotic complexity
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#26Google introduced this idea in 2022 with "FNet: Mixing Tokens with Fourier Transforms" [0]. Later they found out that, performance of their TPU(s) for matrix multiplication was faster than FFT in the most scenarios. [0]: https://arxiv.org/abs/2105.03824
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#27Google introduced this idea in 2022 with "FNet: Mixing Tokens with Fourier Transforms" [0]. Later they found out that, performance of their TPU(s) for matrix multiplication was faster than FFT in the most scenarios. [0]: https://arxiv.org/abs/2105.03824
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#28Google introduced this idea in 2022 with "FNet: Mixing Tokens with Fourier Transforms" [0]. Later they found out that, performance of their TPU(s) for matrix multiplication was faster than FFT in the most scenarios. [0]: https://arxiv.org/abs/2105.03824
Reference for the later part?
On GPU(s) FFT is consistently faster, but in TPU(s), for shorter sequences matrix multiplication was faster.
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#29Isn't flash attention already n log n?
Re: The FFT Strikes Back: An Efficient Alternative to Self-Attention
#30Earlier quoted context omitted.
The actual mechanism at least is quite simple. Essentially it takes the FFT of the input embeddings, multiplies it elementwise with weights that are gotten from the input embeddings using an MLP (plus a constant (but learnable) bias) and then runs it through an activation function and finally takes the inverse FFT. The "frequencies" are probably something quite abstract. FFT is often used in ways where there aren't r…
I’m still confused. Does it treat the input tokens as a sampled waveform? I mean, say I have some text file in ASCII. Do I then just pretend it’s raw wav and do FFT on it? I guess it can give me some useful information (like does it look like any particular natural language or is it just random; sometimes used in encrytion analysis of simple substitution cyphers). It feels surprising that revers FFT can get a coheren…