Re:The FFT Strikes Back: An Efficient Alternative to Self-At...
by Y_Y on Wednesday February 26, 2025 @10:05AM
(#43184296)
What's the finite group in this case?
Re:The FFT Strikes Back: An Efficient Alternative to Self-At...
by markisus on Wednesday February 26, 2025 @10:23AM
(#43184500)
I’m thinking the integers mod 2^n where n is something computers are good at (8, 32, 64). You have hardware support the group operation.
Re:The FFT Strikes Back: An Efficient Alternative to Self-At...
by yorwba on Wednesday February 26, 2025 @10:29AM
(#43184545)
That is the traditional Fourier transform, except it can be a cyclic group of any size, doesn't need to be a power of 2. (Though FFTs with 2^n input size are particularly easy to implement.)
And it's not permutation invariant.
Re:The FFT Strikes Back: An Efficient Alternative to Self-At...
by markisus on Wednesday February 26, 2025 @12:19PM
(#43185767)
I was careless in my thinking, thanks for the correction. I was imagining since you sum the group elements in any order, there is a permutation invariance. But the group elements themselves play the role of the "token index" and group elements are not interchangeable. To actually make this idea interesting, one would have to use a group in which the choice of group element assigned to each input token would not affect the result.
Re:The FFT Strikes Back: An Efficient Alternative to Self-At...
by Y_Y on Wednesday February 26, 2025 @11:16AM
(#43185077)
You mean for the group operation to be standard modular addition? In that case (as a sibling comment says) you'll recover the classic discrete Fourier transform.
Re:The FFT Strikes Back: An Efficient Alternative to Self-At...
by 3vidence on Wednesday February 26, 2025 @10:11PM
(#43190919)
Not an expert in this space.
Aren't tokens transformed with position dependent information in most models?
I believe llama applies a rotation to the vector based on the position in the input.
Re:The FFT Strikes Back: An Efficient Alternative to Self-At...
by markisus on Thursday February 27, 2025 @12:08PM
(#43196256)
That's true in the realm of LLMs. But even in this case, the position information is added only into the first layer. Tokens in later layers can choose to "forget" this information. In addition there are applications of transformers in other domains. See https://github.com/cvg/LightGlue or https://facebookresearch.github.io/3detr/
Re:The FFT Strikes Back: An Efficient Alternative to Self-At...
by topwalktown on Friday February 28, 2025 @12:23AM
(#43202001)
Transformers like Llama use rotary embeddings which are applied in every single attention layer
https://github.com/huggingface/transformers/blob/222505c7e4d...
I would like to see additional experiments using the lesser known Fourier transform over finite groups [1], which is permutation invariant but shares many properties with the standard Fourier transform.
I also wonder if this becomes the next big thing for LLMs, how easy will it be for inference engines(eg vLLM, llama.cpp) to integrate it?
[1] https://en.wikipedia.org/wiki/Fourier_transform_on_finite_gr...