How Tokenization Works: BPE and the Algorithm Behind Your LLM
Learn how Byte Pair Encoding (BPE) actually works — the algorithm that powers GPT, Claude, and LLaMA tokenizers. Step-by-step with examples.

Search for a command to run...
Articles tagged with #tokenization
Learn how Byte Pair Encoding (BPE) actually works — the algorithm that powers GPT, Claude, and LLaMA tokenizers. Step-by-step with examples.

Learn what tokens really are, why they're not words, and how understanding tokenization saves you money on LLM API costs.

I'm building an AI agent from scratch—no frameworks, no abstractions—specifically to understand where every token goes and how much it costs. This is Phase 3 of my token economics research. Phase 1 covered basic tool calling mechanics. Phase 2 reveal...

I've been building an AI agent from scratch. No frameworks, no abstractions, to understand where every token goes and what drives cost at scale. In previous post/phase, I measured how tool definitions and conversation depth impact token usage. The fi...

I built an AI agent from scratch. Not because frameworks aren't good. They are(and I suggest you use them). But because I needed to see where every token goes. When you're building production systems that could cost $150K+/year in LLM tokens alone, y...
