Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Trying to set a tensor of shape torch.Size([896, 768]) in "weight" (which has shape torch.Size([896, 4864])), this looks incorrect #2677

Open
aqe670 opened this issue Feb 7, 2025 · 0 comments

Comments

@aqe670
Copy link

aqe670 commented Feb 7, 2025

I encountered a problem where I pruned the MLP layer of qwen2.5-0.5b,
"0": 4864,
"1": 4864,
"2": 4864,
"3": 4864,
"4": 2816,
"5": 4864,
"6": 4864,
"7": 3840,
"8": 4864,
"9": 2816,
"10": 4864,
"11": 4864,
"12": 4864,
"13": 768,
"14": 4864,
"15": 4864,
"16": 4864,
"17": 768,
"18": 4864,
"19": 4864,
"20": 4864,
"21": 4864,
"22": 4864,
"23": 4864
However, in the config. json file, the mediate_size is global and fixed at 4864, so when I tested the pruned model using lm eval, I encountered an error: ValueError: Trying to set a tensor of shape torch.Size([896, 768]) in "weight" (which has shape torch.Size([896, 4864])), this looks incorrect》 Is there any solution? Or is it another issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant