InternVL icon indicating copy to clipboard operation
InternVL copied to clipboard

If I need to fine-tune internvl2-4b model, which code should I refer to?

Open jingcangcang opened this issue 2 years ago • 4 comments

jingcangcang avatar Jul 10 '24 12:07 jingcangcang

I use the same code base of Mini-InternVL 1.5 4B, update the chat template to the new version (you can check file conversation.py of the huggingface page). It worked fine without error, but it seems weird that when I finetuned the model using LoRA, the performance of the finetuned InternVL2-4B is worse than the finetuned MiniInternVL-4B (test on 2 different datasets). No clue if I missed something.

VietDunghacker avatar Jul 10 '24 16:07 VietDunghacker

I use the same code base of Mini-InternVL 1.5 4B, update the chat template to the new version (you can check file conversation.py of the huggingface page). It worked fine without error, but it seems weird that when I finetuned the model using LoRA, the performance of the finetuned InternVL2-4B is worse than the finetuned MiniInternVL-4B (test on 2 different datasets). No clue if I missed something.

Does it support multiple images for finetuning?

cxmscb avatar Jul 12 '24 09:07 cxmscb

The current codebase does not support it yet. But I think you can look up the branch nopacking_final. There is some code for interleave data in there, but I don't know if it is final. By the way I found the reason for worse performance is because I incorrectly merge the finetuned adapter into the old model (InternVL-1.5). Somehow the merged model still work, what a wonder.

VietDunghacker avatar Jul 12 '24 09:07 VietDunghacker

see here https://github.com/OpenGVLab/InternVL?tab=readme-ov-file

whai362 avatar Jul 13 '24 17:07 whai362