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

[Usage] Error in loading mistral 7b weights #1817

Open
bryanlinnan opened this issue Jan 2, 2025 · 0 comments
Open

[Usage] Error in loading mistral 7b weights #1817

bryanlinnan opened this issue Jan 2, 2025 · 0 comments

Comments

@bryanlinnan
Copy link

Describe the issue

Hi,
i tried to load llava 7b mistral weights into model, got error:ValueError: Trying to set a tensor of shape torch.Size([577, 1024]) in "weight" (which has shape torch.Size([257, 1024])), this looks incorrect

the error occurs in the below code:
model = LlavaMistralForCausalLM.from_pretrained(
model_path,
low_cpu_mem_usage=True,
**kwargs,
sliding_window=4096
)
and the model_path is a local path since i have downloaded the pretrained weights from huggingface

Any idea?

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