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

mismatch shape issues #489

Open
imrankh46 opened this issue Jan 18, 2025 · 0 comments
Open

mismatch shape issues #489

imrankh46 opened this issue Jan 18, 2025 · 0 comments

Comments

@imrankh46
Copy link

hello, i am trying to merge two model with same architecture, so the merging is working but facing issues when loading the model

RuntimeError: Error(s) in loading state_dict for LlamaForCausalLM:
	size mismatch for model.embed_tokens.weight: copying a param with shape torch.Size([96640, 4096]) from checkpoint, the shape in current model is torch.Size([128264, 4096]).
	size mismatch for lm_head.weight: copying a param with shape torch.Size([96640, 4096]) from checkpoint, the shape in current model is torch.Size([128264, 4096]).
	You may consider adding `ignore_mismatched_sizes=True` in the model `from_pretrained` method.

after adding the following
ignore_mismatched_sizes=True
so the modl output is garbage text.

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