InternLM-XComposer icon indicating copy to clipboard operation
InternLM-XComposer copied to clipboard

Can't run with multiple gpu

Open volcverse opened this issue 1 year ago • 7 comments

Hello, thanks for the great work!

I refer to the example_code/example_chat.py to run the newest InternLM-XComposer-2.5 model using 4 NVIDIA 4090 GPUs. But still meet the OOM problem. It seems that although the weights are divided successfully, the first gpu always runs into OOM when model.chat is called.

Any response will be greatly appreciated!

volcverse avatar Jul 10 '24 13:07 volcverse

same

Uoops avatar Jul 11 '24 05:07 Uoops

I refer to the example_code/example_chat.py to run the newest InternLM-XComposer-2.5 model using 4 A800 GPUs. But still meet the OOM problem.

hyyuan123 avatar Jul 11 '24 11:07 hyyuan123

same question

waltonfuture avatar Jul 14 '24 07:07 waltonfuture

Please try to install transformers==4.33.1 with the following command and try again:

pip install transformers==4.33.1

yhcao6 avatar Jul 18 '24 06:07 yhcao6

Hello, thanks for the great work!

I refer to the example_code/example_chat.py to run the newest InternLM-XComposer-2.5 model using 4 NVIDIA 4090 GPUs. But still meet the OOM problem. It seems that although the weights are divided successfully, the first gpu always runs into OOM when model.chat is called.

Any response will be greatly appreciated!

I found the model cannot take multiple images as inputs, neither can it take a list of images thus the fix is

  • Change the image input to a singleton: https://github.com/InternLM/InternLM-XComposer/blob/99a56be441c05337eeed5aacbcb88da447ae2d49/example_code/example_chat.py#L33
image = './examples/dubai.png'
  • Add <ImageHere> Flag https://github.com/InternLM/InternLM-XComposer/blob/99a56be441c05337eeed5aacbcb88da447ae2d49/example_code/example_chat.py#L32
query = '<ImageHere>Please describe this image'

YerongLi avatar Jul 18 '24 22:07 YerongLi

Please try to install transformers==4.33.1 with the following command and try again:

pip install transformers==4.33.1

Still meet the same problem with transformers 4.33.1. I'm running the video understanding example on the huggingface. Response will be greatly appreciated

resi1ience avatar Jul 21 '24 08:07 resi1ience

But still meet the OOM problem with transformers 4.33.1,

gyniy avatar Jun 25 '25 06:06 gyniy