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

Add ability to read layer_map for pytorch model bin files #299

Open
charlesmartin14 opened this issue Dec 6, 2023 · 0 comments
Open

Add ability to read layer_map for pytorch model bin files #299

charlesmartin14 opened this issue Dec 6, 2023 · 0 comments

Comments

@charlesmartin14
Copy link
Member

Some open source models like Mistral-7b have 2 pytorch_model.bin files, BUT the order of the layers is changed
i.e

https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1/

The order of the layers is given in

pytorch_model.bin.index.json

Weightwatcher needs some way to fix the ordering of the layers

say after running analyze() by reading the final map file and fixing the ordering

This approach could be used for safetensors also

Note that if the order is not sequential, we can not run intra=True, but thats ok for now

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