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

weight_diff.py state_dict_recovered[key].add_(state_dict_raw[key]) RuntimeError: The size of tensor a (32001) must match the size of tensor b (32000) at non-singleton dimension 0 #304

Open
gaodexiaozheng opened this issue Nov 22, 2023 · 2 comments

Comments

@gaodexiaozheng
Copy link

when running the below commend:
python weight_diff.py recover --path_raw /models/Llama-2-7b-hf --path_diff /models/alpaca-7b-wdiff --path_tuned ./llama-alpaca-7b-hf

it shows the error:
RuntimeError: The size of tensor a (32001) must match the size of tensor b (32000) at non-singleton dimension 0

though I can understand this error, this should be resolved.

@boyue-jiang
Copy link

I encountered the same problem. When I check the source code, I found that relates to the format of the model.state_dict. So you should check the state_dict shape of the raw model and model diff.

@Irenehere
Copy link

I have the same problem. Any idea to solve this error?

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

3 participants