LongVU icon indicating copy to clipboard operation
LongVU copied to clipboard

Finetuning from an image checkpoint does not work

Open geomlyd opened this issue 2 years ago • 3 comments

Hello there, thanks for releasing your code! When I try to finetune one of the image-trained checkpoints (e.g. LongVU_Llama3_2_3B_img), this line fails, with the error being that the VisionCrossAttentionLayer has no attribute pos_embed_0.

As far as I can understand, this error seems to be due to the fact that the pretrained config of this model has image_token_len 576, and this results in these layers only attending to a single key-value pair from the features of each vision tower. The arguments for finetuning include --image_token_len 144, but it seems to me that this takes no effect anywhere. Could there be some error in how these modules get instantiated, or am I not using something correctly?

geomlyd avatar Nov 13 '24 12:11 geomlyd

As mentioned in README here. You need to change the config from 576 to 144 for video finetuning.

xiaoqian-shen avatar Nov 13 '24 22:11 xiaoqian-shen

Thanks, I must have missed that. However, what's the reason for having this as a command line argument as well, if it seemingly does nothing?

geomlyd avatar Nov 14 '24 08:11 geomlyd

The argument has been used here.

xiaoqian-shen avatar Nov 14 '24 09:11 xiaoqian-shen