-
Notifications
You must be signed in to change notification settings - Fork 536
export llama failing with errors for runtime errors #2907
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
Comments
Thanks @chauhang for reporting this issue! Could you confirm the vocab_size in llama2 7B model's params.json? |
@iseeyuan For the meta-llama/Llama-2-7b model the params.json on HF is: {"dim": 4096, "multiple_of": 256, "n_heads": 32, "n_layers": 32, "norm_eps": 1e-05, "vocab_size": -1} Also checked for 13b/70b base models and the chat models all of them have vocab_size=-1 in their params.json |
@chauhang , It's a bug in our code. We should provide an option so that the export_llama works out of box, given a downloaded folder, either from llama official website, or from HuggingFace. |
Also tested for llama2-7b after updating vocab_size to 32000, getting error Full error logs here |
After removing spda param was able to proceed uptill running model on computer. On running the model get error Full logs here |
Got the llama2-7b model working on macOS and Android. Local model runtime on macOS: Model load time: 10.39s, Time to first generated token: 0.739s, Generated token rate: 0.3089 toks/sec Updated list of issues: LLama2 model
Stories Model
|
@chauhang , the second issue, |
Might be related to @larryliu0820's diff that got reverted recently |
we should just cherry-pick that, right? |
Summary: Fixing issues we've seen in pytorch#2907 and pytorch#2805 Differential Revision: D55893925
Summary: Fixing issues we've seen in pytorch#2907 and pytorch#2805 Differential Revision: D55893925
Summary: Pull Request resolved: #2926 Fixing issues we've seen in #2907 and #2805 bypass-github-export-checks bypass-github-pytorch-ci-checks bypass-github-executorch-ci-checks Reviewed By: iseeyuan, cccclai Differential Revision: D55893925 fbshipit-source-id: c6e0264d868cb487faf02f95ff1bd223cbcc97ac
Summary: Pull Request resolved: #2926 Fixing issues we've seen in #2907 and #2805 bypass-github-export-checks bypass-github-pytorch-ci-checks bypass-github-executorch-ci-checks Reviewed By: iseeyuan, cccclai Differential Revision: D55893925 fbshipit-source-id: c6e0264d868cb487faf02f95ff1bd223cbcc97ac (cherry picked from commit 6db9d72)
Summary: Pull Request resolved: #2926 Fixing issues we've seen in #2907 and #2805 bypass-github-export-checks bypass-github-pytorch-ci-checks bypass-github-executorch-ci-checks Reviewed By: iseeyuan, cccclai Differential Revision: D55893925 fbshipit-source-id: c6e0264d868cb487faf02f95ff1bd223cbcc97ac (cherry picked from commit 6db9d72)
Things are fixed now. |
Export llama is failing with errors for llama and stories models
Error for llama model:
Could not import fairseq2 modules....RuntimeError: Trying to create tensor with negative dimension -1: [-1, 4096]
Error for stories model:
Could not import fairseq2 modules....RuntimeError: mmap can only be used with files saved with
torch.save(./stories/stories110M.pt, _use_new_zipfile_serialization=True), please torch.save your checkpoint with this option in order to use mmap.`Steps to run for Llama model
Follow the steps from LLM manual
Download the meta versions of llama weights
Run export_llama script
Error details for llama2 model export
Steps for Stories model
Download the model from the links specified
Run
python -m examples.models.llama2.export_llama -c ./stories/stories110M.pt -p ./stories/params.json
Error details for Stories model export
Environment
The text was updated successfully, but these errors were encountered: