Reversing Claude's tokenizer: not BPE, vocab shrunk to ~16k as token costs rose 40%

anpaure · x · 2026-12-05

Sander Land reverse-engineered Claude's mysterious tokenizer (open-sourced as ctok), following a 40%+ token cost increase for basic English text. Key findings: it's not standard byte-level BPE — the Hangul syllable 최 is one token whose UTF-8 prefix/suffix aren't tokens anywhere else, matching MinGram/PathPiece-style minimum-piece tokenization; vocabulary appears to have shrunk from 49k (Claude v3–v4.6) to 16k; and it uniquely wraps word-like spans in boundary markers.

Original post →

More from Models

Models channel →