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

Implementation of LlamaTokenizer (without sentencepiece) #60

Open
MaveriQ opened this issue Mar 26, 2024 · 0 comments
Open

Implementation of LlamaTokenizer (without sentencepiece) #60

MaveriQ opened this issue Mar 26, 2024 · 0 comments

Comments

@MaveriQ
Copy link

MaveriQ commented Mar 26, 2024

@karpathy

Thanks for the great lecture and implementation! As always, it was a pleasure.

I have tried to implement LlamaTokenizer (without using sentencepiece backend) staying as close to minbpe implementation as possible. Essentially it involves doing BPE on unicode, having utf-8 byte fallback and using character coverage to handle rare tokens doing training. The implementation is available here. I haven't made a pull request because it's still not EXACTLY the same as LlamaTokenizer. But I am hoping people can use it as a starting point.

Please refer to the README.md (point 6) for details on new functionality and caveats/TODOs

Best
Haris

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