Giter Site home page Giter Site logo

Comments (6)

guynich avatar guynich commented on May 26, 2024 1

I see: I've only used "flash_attn" and needed this PR.

from distil-whisper.

sanchit-gandhi avatar sanchit-gandhi commented on May 26, 2024 1

Closing as resolved! Feel free to re-open if you continue to encounter issues

from distil-whisper.

guynich avatar guynich commented on May 26, 2024

This might help: #76

from distil-whisper.

thomaschhh avatar thomaschhh commented on May 26, 2024

Looks good for --attn_type "flash_attn" but not for --attn_type "flash_attn_2". In that case I still get the above-mentioned error.

from distil-whisper.

sanchit-gandhi avatar sanchit-gandhi commented on May 26, 2024

Fixed in #101! You can now set --attn_implementation to either {"eager", "sdpa", "flash_attn_2"}:

"Which attention implementation to use in the encoder and decoder attention layers. Can be one of:\n"
"1. `eager` or `None`: default Transformers attention implementation.\n"
"2. `sdpa`: Flash Attention through PyTorch SDPA. Requires `torch>=2.1`. Recommended for hardware where Flash Attention 2 is not supported, e.g. Turing GPUs, (T4, RTX 2080).\n"
"3. `flash_attn_2`: Flash Attention 2 through the Flash Attention package https://github.com/Dao-AILab/flash-attention. **Always** recommended on supported hardware (Ampere, Ada, or Hopper GPUs, e.g., A100, RTX 3090, RTX 4090, H100)."

The README has been updated to reflect this change: https://github.com/huggingface/distil-whisper/tree/main/training#1-pseudo-labelling

from distil-whisper.

thomaschhh avatar thomaschhh commented on May 26, 2024

I just looked into it again and it seems like there is a mismatch between the help string

"3. `flash_attn_2`: Flash Attention 2 through the Flash Attention package https://github.com/Dao-AILab/flash-attention. **Always** recommended on supported hardware (Ampere, Ada, or Hopper GPUs, e.g., A100, RTX 3090, RTX 4090, H100)."
and the value that is expected in L142, which is flash_attention_2 and not flash_attn_2.

from distil-whisper.

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.