Hacker News new | ask | show | jobs
by adroitboss 1105 days ago
Does anyone know of a chatgpt/gpt-4 tokenizer that can run client-side?
4 comments

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
Thanks for the recommendations. I found the one I needed because of this comment thread.
Yes, tiktoken, here's a client side visualizer for it

https://github.com/functorism/gpt4-tokenizer-visualizer

Thanks for the recommendations everyone.