Giter VIP home page Giter VIP logo

Comments (5)

logicwong avatar logicwong commented on May 17, 2024 5

补充一点,刚才的实验只提到了context length,其实跟output length的关系也很大。
当output length比较小,context length比较大时,瓶颈主要context的计算上,这时候FlashAttention就比较有优势;
当output length比较大,瓶颈就落在autoregressive的单步推理上,FlashAttention的提速就比较弱了

from qwen.

jeffchy avatar jeffchy commented on May 17, 2024

flash主要是训练降显存,提速度。推理一般都没太大用处。

from qwen.

jackaihfia2334 avatar jackaihfia2334 commented on May 17, 2024

我也是,还使用了最新的flash-attention-2,是因为flah-attn确实对推理加速不明显吗?

from qwen.

logicwong avatar logicwong commented on May 17, 2024

其实跟序列长度关系比较大,短序列提速不明显,长序列提速还是比较可观的。简单测试了一下:

  • 5000左右的context length,提速有20%以上;
  • 50左右的context length (Readme里的case),提速不到5%

from qwen.

oxyhexagen avatar oxyhexagen commented on May 17, 2024

我也是,还使用了最新的flash-attention-2,是因为flah-attn确实对推理加速不明显吗?

@jackaihfia2334 您好,请问使用flash attn2需要对原始代码的一些层进行更名吗?还是可以直接使用?

from qwen.

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.