InternVideo icon indicating copy to clipboard operation
InternVideo copied to clipboard

Problem with dropout_layer_norm

Open anfortas337 opened this issue 11 months ago • 1 comments

Hi, thank you for your great work! I want to use InternVideo2 as backbone. I installed flash-attn 2.7.3 and dropout_layer_norm from source. But now i am struggling with this error when trying to run sample code:

Traceback (most recent call last): File "/home/maxim/test/main.py", line 2, in import InternVideo.InternVideo2.single_modality.models.internvideo2 File "/home/maxim/test/InternVideo/InternVideo2/single_modality/models/init.py", line 1, in from .internvl_clip_vision import internvl_clip_6b File "/home/maxim/test/InternVideo/InternVideo2/single_modality/models/internvl_clip_vision.py", line 13, in from flash_attn.ops.rms_norm import DropoutAddRMSNorm File "/home/maxim/anaconda3/envs/myenv/lib/python3.12/site-packages/flash_attn/ops/rms_norm.py", line 7, in from flash_attn.ops.layer_norm import ( File "/home/maxim/anaconda3/envs/myenv/lib/python3.12/site-packages/flash_attn/ops/layer_norm.py", line 4, in import dropout_layer_norm ImportError: /home/maxim/anaconda3/envs/myenv/lib/python3.12/site-packages/dropout_layer_norm.cpython-312-x86_64-linux-gnu.so: undefined symbol: __cxa_call_terminate

Can you give any guidance how to solve it or provide config.json like you have on hugging face for VideoMae please. That will be really helpfull Thank you!

anfortas337 avatar Jan 16 '25 20:01 anfortas337

You could replace it with simple RMSnorm, see https://github.com/OpenGVLab/VideoChat-Flash/blob/657c2e7ee91b357d424ac7255b96e1809e7d5dae/llava-train_videochat/llava/model/multimodal_encoder/internvideo2/vit_scale_clean.py#L119C7-L119C14

leexinhao avatar Feb 27 '25 14:02 leexinhao