Update to flash-attn2 - #149
Conversation
…ash-attn2. Updated README.md with flash-attn2 installation and notes
… using padding_mask
|
In ur latest changes, u have set the |
|
Hey, I've been having trouble installing this package for days and I thought I could benefit from compiling your version. Although the installation process didn't raise any errors, when importing the package, I receive the following error. All I did was create a venv with Python3 and install scGPT from a downloaded directory of your version.
Did you encounter a similar issue while importing your version? |
|
@moa4020 Thanks for your comment. I believe I have encountered this issue before, but I cannot recall the details at the moment. Nevertheless, I consider it a valid approach to evaluate scGPT based on its original design without enabling the flash-attn module. For a quick reference on running the scGPT model, you may refer to this repo, which provides a complete pipeline for both inference and fine-tuning. |
|
Update Comments
Modified scgpt/model/model.py & scgpt/model/multiomic_model.py for flash-attn2. Updated README.md with flash-attn2 installation and notes.
Updated Dependencies
flash-attn 1.x --> flash-att 2.x
Is Code Tested?
Yes. The updated code was tested on A100 GPU (Linux), and it works fine doing fine-tuning integration with the latest Flash Attention 2.
Note:
In the current version of code, scGPT uses FlashMHA. And the updated flash-attn2 uses a module named mpa.py. The details of newer MHA implementation can be found HERE starting at line 354 flash_attn/modules/mha.py