-
Notifications
You must be signed in to change notification settings - Fork 69
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
ModuleNotFoundError: No module named 'dropout_layer_norm' #102
Comments
This is caused by the missing installation of some libs given in flash attention. You need to get the source code of flash attention, and then install layer_norm as in https://github.com/Dao-AILab/flash-attention/blob/main/csrc/layer_norm/README.md and fused_mlp as in https://github.com/Dao-AILab/flash-attention/blob/main/csrc/fused_dense_lib/README.md. We will update installation doc soon. |
If your machine did not support the installation of these libs, you could alter the settings in config.py that does not use half precision and bf16 for running. In that case, the code would use naive attention impl instead of flash attention. |
@shepnerd can you please specify where to make changes ? my hardware does not support flas attention, also i just wanted to test inference of the model from the demo notebook |
You can refer to this instruction to install dependencies to run flash-attn with layernorm and other components. If your hardware does not support flash-attn and its dependenies installation, you can try common attention by setting using full-precision compute in config.py for bypassing it. Taking internvideo2_stage2_config.py as an example, you need to set the following variables to use_half_precision = False
use_bf16 = False
use_flash_attn=False,
use_fused_rmsnorm=False,
use_fused_mlp=False, |
I am still having issues despite installing flash-attn and changing the config.py. ModuleNotFoundError: No module named 'dropout_layer_norm' when ModuleNotFoundError Traceback (most recent call last) File //Code/InternVideo/InternVideo2/multi_modality/utils.py:9 File /Code/InternVideo/InternVideo2/multi_modality/models/backbones/internvideo2/init.py:1 File /Code/InternVideo/InternVideo2/multi_modality/models/backbones/internvideo2/internvl_clip_vision.py:16 ModuleNotFoundError: No module named 'dropout_layer_norm' |
Error occurred while running demo.ipynb in InternVideo2's multi_modality demo.
I installed packages according to requirements.txt.
The text was updated successfully, but these errors were encountered: