Open fancy12335 opened 3 weeks ago
Where did you download the mm_projector,bin from?
You should directly download them using the git lfs
way.
The link is: https://huggingface.co/lmms-lab/llava-onevision-projectors/tree/main
145
I indeed downloaded the projection layer weights from this link, and they matched the model, yet I still encountered this error. However, I have identified the issue and resolved it. While debugging, I noticed that at line 108 in LLaVA-NeXT/llava/model/llava_arch.py, self.mm_projector had a size of 0. I added the following line at line 109: self.mm_projector = build_vision_projector(self.config, vision_cfg=vision_tower.config), and this allowed the script to run correctly. I hope this change might be helpful to you as well. Thank you for your support.
145
I indeed downloaded the projection layer weights from this link, and they matched the model, yet I still encountered this error. However, I have identified the issue and resolved it. While debugging, I noticed that at line 108 in LLaVA-NeXT/llava/model/llava_arch.py, self.mm_projector had a size of 0. I added the following line at line 109: self.mm_projector = build_vision_projector(self.config, vision_cfg=vision_tower.config), and this allowed the script to run correctly. I hope this change might be helpful to you as well. Thank you for your support.
Thx, For me, that's work!
build_vision_projector is a simple init for Pytorch Sequential. Fundamentally speaking, This error occurred to Zero3 Rather than Zero2, Since Zero3 don't correct init the New Created Pytorch Sequential. Thus, their shape is [0].
I encountered the following error when running the ’finetune_onevision.sh‘ script using the ‘mm_projector.bin’ file provided at this link:
I have only modified the following in the ’finetune_onevision.sh‘ script: the model path (to the local path of the downloaded ’ llava-onevision-qwen2-0.5b-ov ‘ model), the dataset path, the ‘mm_projector.bin’ path (replacing it with the local path), and the output path for the fine-tuned model.
Could you please confirm if there is an issue with the provided mm_projector.bin file?