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

Exporting Llama3's tokenizer #3555

Open
vifi2021 opened this issue May 8, 2024 · 6 comments
Open

Exporting Llama3's tokenizer #3555

vifi2021 opened this issue May 8, 2024 · 6 comments
Assignees
Labels
bug Something isn't working module: doc Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@vifi2021
Copy link

vifi2021 commented May 8, 2024

Hello,

I am following https://github.com/pytorch/executorch/blob/main/examples/models/llama2/README.md#option-c-download-and-export-llama3-8b-model to make Llama3-8B-instruct to run on an S21 Ultra. But seems like the examples.models.llama2.tokenizer.tokenizer cannot process llama3's tokenizer.model.

Has anyone run into this issue?

@iseeyuan
Copy link
Contributor

iseeyuan commented May 9, 2024

@larryliu0820 , could you help look at this?

@larryliu0820
Copy link
Contributor

Hello you don't need to process tokenizer.model you can just feed it into this step: https://github.com/pytorch/executorch/blob/main/examples/models/llama2/README.md#step-4-run-on-your-computer-to-validate

@vifi2021
Copy link
Author

vifi2021 commented May 9, 2024

Thanks for the fast response.
But I am not running it on my computer. I am running it on an Android phone.
In https://github.com/pytorch/executorch/blob/main/examples/models/llama2/README.md#step-5-run-benchmark-on-android-phone step 2.2, it requires to upload model, tokenizer to the phone:

adb push <model.pte> /data/local/tmp/llama/
adb push <tokenizer.bin> /data/local/tmp/llama/

Looks like we still need tokenizer.bin?

@jonatananselmo
Copy link

Just do:

adb push <tokenizer.model> /data/local/tmp/llama/

And use <tokenizer.model> wherever you need to specify the tokenizer.

@JacobSzwejbka
Copy link
Contributor

@kirklandsign Since theres some android question can u take a look

@JacobSzwejbka JacobSzwejbka added the bug Something isn't working label May 9, 2024
@mergennachin
Copy link
Contributor

@vifi2021

In Step 4, we have this "For Llama3, you can pass the original tokenizer.model (without converting to .bin file)."

It also applies to subsequent steps.

@kirklandsign

In our readme file, for Step 5, 2.2 and 2.3, we make that clear.

@mergennachin mergennachin added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: doc Related to our documentation, both in docs/ and docblocks labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module: doc Related to our documentation, both in docs/ and docblocks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

7 participants