Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
adroitboss
· 3y ago · 0 comments
Does anyone know of a chatgpt/gpt-4 tokenizer that can run client-side?
Comments
[–]
sp332
3y ago
https://platform.openai.com/tokenizer
or the official python library tiktoken
https://github.com/openai/tiktoken
or this JS port of tiktoken
https://github.com/dqbd/tiktoken
[–]
oofsa
3y ago
https://platform.openai.com/tokenizer
is not for GPT-4 but GPT-3.
https://tiktokenizer.vercel.app/
supports GPT-4.
[–]
adroitboss
OP
3y ago
Thanks for the recommendations. I found the one I needed because of this comment thread.
[–]
YetAnotherNick
3y ago
https://github.com/cogentapps/chat-with-gpt/blob/main/app/sr...
[–]
WilliamBerglund
3y ago
Yes, tiktoken, here's a client side visualizer for it
https://github.com/functorism/gpt4-tokenizer-visualizer
[–]
adroitboss
OP
3y ago
Thanks for the recommendations everyone.