How Tokenization Works: BPE and the Algorithm Behind Your LLM
Every time you send a message to GPT-4 or Claude, an algorithm from 1994 decides how much you'll pay.
That algorithm is Byte Pair Encoding — BPE for short. It's not glamorous, but it's running under the hood of nearly every modern LLM. Once you under...
blog.pragmaticbyharsh.com9 min read