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

Runtime Error:The weights trying to be saved contained shared tensors. #31

Open
IEI-mjx opened this issue Jul 15, 2024 · 3 comments
Open

Comments

@IEI-mjx
Copy link

IEI-mjx commented Jul 15, 2024

The model was quantized successfully.
image
But failed when saving the model:
image

@mgoin
Copy link
Member

mgoin commented Jul 16, 2024

Hi @IEI-mjx does the model have tied embeddings?

@IEI-mjx
Copy link
Author

IEI-mjx commented Jul 17, 2024

Hi @IEI-mjx does the model have tied embeddings?

Yes

@IEI-mjx
Copy link
Author

IEI-mjx commented Jul 17, 2024

I skipped this error by copying the shared weight both lm_head.weight and model.embed_tokens.weight.
Since I haven't test this FP8-KV version model, I'm not sure whether this modification to save_quantized_model() is correct or not.

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

2 participants