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

How can i use the SentencePieceTokenizer ? #21

Open
Allakazan opened this issue May 30, 2024 · 3 comments
Open

How can i use the SentencePieceTokenizer ? #21

Allakazan opened this issue May 30, 2024 · 3 comments

Comments

@Allakazan
Copy link

Could you guys provide a description of how to use this tokenizer ? I tried by myself but i couldn't figure out on how to make it work.

Thanks :)

@keyvank
Copy link
Owner

keyvank commented May 30, 2024

Feed your dataset.txt to the spm_train command. (Docs here: https://github.com/google/sentencepiece)

This will generate a "vocab file". Use it for initializing the SentencePieceTokenizer:

SentencePieceTokenizer::load("model.vocab")

@Allakazan
Copy link
Author

Thanks, it works :)

Now i will try to implement some sort of EOS_TOKEN on the tokenizer, for doing a question/answer model

@keyvank
Copy link
Owner

keyvank commented May 31, 2024

Sounds good! Let me know if you got good results!

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