BAAI-DCAI / M3D

M3D: Advancing 3D Medical Image Analysis with Multi-Modal Large Language Models
MIT License
207 stars 10 forks source link

Problem with Quickstart program #36

Open aticejiang opened 1 week ago

aticejiang commented 1 week ago

I met the problem with "TypeError: PatchEmbeddingBlock.init() got an unexpected keyword argument 'pos_embed'" , when using the program in Quickstart (M3D-LaMed-Phi-3-4B). Specifically, in "class myViT(nn.Module)": self.patch_embedding = PatchEmbeddingBlock( in_channels=in_channels, img_size=img_size, patch_size=patch_size, hidden_size=hidden_size, num_heads=num_heads, pos_embed=pos_embed, dropout_rate=dropout_rate, spatial_dims=spatial_dims, ) The argument 'pos_embed' can be 'proj_type'? But I can't modify this argument, because of the 'trust_remote_code=True'? So, what can I do to fix it. By the way, I'm using transformers.version = '4.45.0.dev0'

baifanxxx commented 5 days ago

Hi,

Thank you for your attention, please try a lower version of transformers.