Giter VIP home page Giter VIP logo

Comments (2)

fyang064 avatar fyang064 commented on July 27, 2024 2

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?

from infinitransformer.

Beomi avatar Beomi commented on July 27, 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.

from infinitransformer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.