Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limitations of the method #13

Open
fyang064 opened this issue Apr 17, 2024 · 2 comments
Open

Limitations of the method #13

fyang064 opened this issue Apr 17, 2024 · 2 comments

Comments

@fyang064
Copy link

Just wondering if any limitations of the Infini-attention like inference speed and model performance. Not too much discussions in the paper.

@Beomi
Copy link
Owner

Beomi commented Apr 18, 2024

Since infini attention uses segmentation which is mainly focused on reducing memory usage and computational cost into O(N) so if you use very long seq such as seq len = 1M, then you have to wait 5min per batch on 1x H100 gpu.

In this implementation I used for loop to make it work so you'll get exactly N times more time to inference or to train.

e.g.,
segment 2048 & block 2048 ==> 1 segments, just 1 attention computation
segment 2048 & block 32K ==> 16 segments, slower 16 times than block 2048

Model performance check was done at the paper with PPL but we may need more tests on very long sequence based tests.

@fyang064
Copy link
Author

Since infini attention uses segmentation which is mainly focused on reducing memory usage and computational cost into O(N) so if you use very long seq such as seq len = 1M, then you have to wait 5min per batch on 1x H100 gpu.

In this implementation I used for loop to make it work so you'll get exactly N times more time to inference or to train.

e.g., segment 2048 & block 2048 ==> 1 segments, just 1 attention computation segment 2048 & block 32K ==> 16 segments, slower 16 times than block 2048

Model performance check was done at the paper with PPL but we may need more tests on very long sequence based tests.

I agree with you that more tests on very long sequence input are needed. It's not unique to think about using the segmentation to break down the long sequence input by for loop, e.g. RingAttention. Just curious about the impact of compressive memory, how does it influence the computation of attention when dealing with the long input?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants