If I need to fine-tune internvl2-4b model, which code should I refer to?
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.
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?
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.
see here https://github.com/OpenGVLab/InternVL?tab=readme-ov-file