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

Support other encodings, like cl100k_base #5

Open
leafduo opened this issue Mar 7, 2023 · 1 comment
Open

Support other encodings, like cl100k_base #5

leafduo opened this issue Mar 7, 2023 · 1 comment

Comments

@leafduo
Copy link

leafduo commented Mar 7, 2023

I'm making an application which calls ChatGPT API in Go, and I need to estimate how many tokens I'm using. ChatGPT uses cl100k_base encoding, while go-gpt-3-encoder only supports (I think) p50k_base.

Is there any plan to support cl100k_base?

I don't really know how BPE works, but according to this, different encodings have different vocabulary, pat regex and special tokens.

@j178
Copy link

j178 commented Mar 22, 2023

I made a Go binding for Rust implemetation of tiktoken, maybe you're interested: https://github.com/j178/tiktoken-go

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