A few extra notes on tokens. You don't have to use tiktoken if you aren't actually tokenizing things. The token lists are just text files that consist of the characters base64 encoded followed by the numeric ID. If you want to explore the list you can just download them and decode them yourself. I find that sorting tokens by length makes it a bit easier to get a feel for what's in there. GPT-4 has a token vocabulary…
Here is the list of the 100k GPT-4 tokens as text file. https://gist.github.com/s-macke/ae83f6afb89794350f8d9a1ad8a0... Yes, a lot of tokens are just for code. Edit: Here as raw link for the poor mobile devices: https://gist.githubusercontent.com/s-macke/ae83f6afb89794350...
There’s something poetic about ULL being a token, but NULL not being one.