-
Notifications
You must be signed in to change notification settings - Fork 898
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
Unofficial bindings / ports in other languages #97
Comments
👋, I built a port for go that you can find in the link below |
I am currently using a another port in Go. |
Hello @hauntsaninja , I was looking at https://github.com/openai/tiktoken/blob/main/src/lib.rs and it appears to be written in Rust. Could this be open sourced into a crate of its own? |
See the FAQ #98 |
@hauntsaninja would it be possible to publish the full test suite publicly? That would make it easier to tell whether a given implementation matches (or is close to) the official implementation. |
Here's a pure JavaScript / TypeScript port of tiktoken: https://github.com/niieani/gpt-tokenizer |
This comment was marked as resolved.
This comment was marked as resolved.
@shylockWu they're not incorrect. You've set gpt-tokenizer to tokenize using GPT-3.5/GPT-4 encoding, whereas the official openAI token calculator uses the older GPT-3. If you switch the playground to use the older model, you'll get the same result. |
👋 I ported a version of PHP, link here |
I have built and published a port for Kotlin: https://github.com/aallam/ktoken :) |
Pure Haskell implementation of tiktoken: https://hackage.haskell.org/package/tiktoken |
The following projects are not maintained by OpenAI. I cannot vouch that any of them are correct or safe to use. Use at your own risk.
Note that if a tokeniser fails to exactly match tiktoken's behaviour, you may get worse results when sampling from models, with no warning.
Javascript
Rust
Java
Ruby
C#
Go
PHP
Kotlin
Thanks to everyone for building useful things!
I'm happy to link to other projects in this comment.
The text was updated successfully, but these errors were encountered: