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

Proposal: check model path in --model_path scripts #131

Open
jeremyfowers opened this issue Mar 11, 2024 · 0 comments
Open

Proposal: check model path in --model_path scripts #131

jeremyfowers opened this issue Mar 11, 2024 · 0 comments

Comments

@jeremyfowers
Copy link
Collaborator

Some model scripts, such as https://github.com/onnx/turnkeyml/blob/main/models/transformers/llama2_7b.py, allow the user to pass custom model weights by path. Currently those paths are completely arbitrary, so a user could, for example, accidentally pass LLaMA-2-13b weights to llama2_7b.py, which would give unintended results.

Proposed solution: require some kind of string matching in the model path. For exmaple, all LLaMA-2-7b checkpoints could be required to have "LLaMA-2-7b" or "7b" in the --model_path.

Bonus solution: allow --model_path to be generic with respect to the specific model size. For example, "meta-llama/Llama-2-*b-hf" could load the 7b weights in llama2_7b.py, the 13b weights in llama2_13b.py, etc.

cc @danielholanda

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