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

What is the format of weights for the input model to convert.py? #2571

Closed
RonanKMcGovern opened this issue Aug 9, 2023 · 2 comments
Closed

Comments

@RonanKMcGovern
Copy link

Here is a comment from the ReadMe regarding usage of convert.py:

# obtain the original LLaMA model weights and place them in ./models

However, it's not clear what format those weights need to be in...

  1. In what format do I need to have the original weights? consolidated.00.pth or .bin?
  2. If .bin, do the weights need to be float 32 or can they be bf16?
  3. If .bin, is there a way to handle sharded weights? e.g. Llama 2 7B sharded into ~10 GB and ~3 GB? Can I specify each shard as a command line argument here:
# convert the 7B model to ggml FP16 format
python3 convert.py models/7B/
@RonanKMcGovern
Copy link
Author

Ok, I should have just looked at convert.py before in llama ccp.

To answer my own Qs:

  • convert.py supports input models in many formats (including .pth and .bin)
  • convert.py supports multiple data types, including float 32 and bf16
  • convert.py even supports shards and finds them automatically (very nice!)

@Kushagrapuro
Copy link

thnx

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