Error loading checkpoint

#11
by EvGUT - opened

Hi, I am getting this ValueError: Trying to set a tensor of shape torch.Size([1024, 5120]) in "weight" (which has shape torch.Size([1280, 5120])), this look incorrect.

transformers installed from git rep latest commit in main
Any ideas how to solve this?

Are you sure you have installed transformers from main?

pip install --upgrade git+https://github.com/huggingface/transformers.git

To check:

pip show transformers

Yeah, thank you, seems like problem was in my code
Didn't check that head_dim != hidden_size // num_heads

EvGUT changed discussion status to closed

Sign up or log in to comment