TokenPacker icon indicating copy to clipboard operation
TokenPacker copied to clipboard

mat1 and mat2 shapes cannot be multiplied (576x1024 and 4096x1024)

Open zhayert opened this issue 10 months ago • 2 comments

Hello, great work. I encountered a problem in the core code: File "/tmp/pycharm_project_858/m_llava/model/multimodal_projector/builder.py", line 112, in forward key = self.ln_k_1(self.k_proj_1(x_multi)).permute(1, 0, 2) RuntimeError: mat1 and mat2 shapes cannot be multiplied (576x1024 and 4096x1024) I am using clip-vit-large-patch14-336, which shows that the shape of the encoded tensor should be (bs, 576, 1024). It seems that it does not match the 4096 above? Why is this?

zhayert avatar Feb 04 '25 13:02 zhayert

same problem

laobenmao avatar Feb 10 '25 05:02 laobenmao

要用多层特征。llava里面只用了一层是576, 1024,要用作者给的代码。

Jmh0527 avatar Feb 15 '25 03:02 Jmh0527