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

unable to convert llama 3.3 weights to hf.py #35326

Open
1 of 4 tasks
AshishMulupuri opened this issue Dec 18, 2024 · 3 comments
Open
1 of 4 tasks

unable to convert llama 3.3 weights to hf.py #35326

AshishMulupuri opened this issue Dec 18, 2024 · 3 comments
Labels

Comments

@AshishMulupuri
Copy link

System Info

python == 3.10.12
transformers == 4.45.1

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

I ran the convert_llama_weightsto_hf.py script on the llama-3.3-70B-Instruct checkpoint weights
!python convert_llama_weights_to_hf.py --input_dir "llama_3_3_model/Llama-3.3-70B-Instruct/original" --model_size 70B --output_dir "llama_3_3_model/Llama-3.3-70B-Instruct/hf-converted",
and got the
ValueError: Failed to instantiate tokenizer.Pleae, make sure you have sentencepiece and protobuf.
I tried upgrading both sentencepiece and protobuf but same error is occurring again

Expected behavior

downloaded from HuggingFace Files.

@Ulton321
Copy link

Ulton321 commented Dec 20, 2024

I think the issue here is with your dependencies

1. Upgrade Dependencies

Ensure that the necessary dependencies are installed and up-to-date. Run the following command:

pip install --upgrade sentencepiece protobuf
pip show sentencepiece protobuf

I think it should run like normal

@AshishMulupuri
Copy link
Author

I tried it, upgraded versions protobuf-5.29.2 and sentencepiece-0.2.0
but still got the same error.

@hvaara
Copy link
Contributor

hvaara commented Dec 21, 2024

Were you using a notebook? Did you remember to restart the notebook session after installing the dependencies? I was able to convert the llama weights by using a dev install of transformers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants