← All guides
How LLMs Work · Ep 02

How Tokens Really Work

Why can a genius LLM fail to count the R’s in “strawberry”? Because it never actually sees letters — it receives sealed subword chunks called tokens.

100 tokens ≈ 75 English words · Chunks, not letters
The Mystery

Human view vs. LLM view of “strawberry”

You see 10 separate letters with 3 obvious R’s. The LLM only receives 3 opaque chunk IDs.

How you see it · 10 letters (3 R’s)

str1awber2r3y

How an LLM sees it · 3 sealed tokens

“str”ID 496
“aw”ID 675
“berry”ID 15717
Step 1 · Chunks

How everyday text gets sliced

Common words stay whole. Longer or rarer words split into reusable parts. Leading spaces (·) and punctuation count too.

“cat”
cat 1 token
“unbelievable”
un believ able 3 tokens
“Hi, friend!”
Hi , ·friend ! 4 tokens
Step 2 · Byte Pair Merging

How the slicer learns its vocabulary

During training, the tokenizer scans billions of pages and repeatedly glues the most frequent neighbor pairs together until common roots become clean single tokens.

Start · 7 raw letters
playing
Merge frequent pairs · 3 pieces
playing
Final reusable tokens · 2 tokens ✓
playing
Key Ideas

3 things tokens control

01
Speed & Cost More tokens means more steps to read your input and generate each reply.
02
Memory Limit Context windows are measured in tokens — roughly 100 tokens ≈ 75 English words.
03
Letter Blindness Counting letters or spelling backwards is tricky because models see chunk IDs, not letters.