Thursday, December 3, 2026 | London 10°C · Drizzle
DailyGlimpse

AI

Tokenization 101: How GPT Processes Your Text Behind the Scenes

Rohit Thimaya. 1 min read

In the second installment of a 100-day series on AI, we dive into tokenization—the foundational process that large language models like GPT use to break down text. Tokenization converts raw text into smaller units called tokens, which can be words, subwords, or even characters. This step is crucial because models cannot understand raw strings; they need numerical representations. GPT uses Byte-Pair Encoding (BPE) to efficiently handle common words as single tokens while splitting rare words into multiple tokens. For example, "tokenization" might be split into "token" and "ization". This approach balances vocabulary size and model comprehension, enabling GPT to process diverse languages and technical terms. Understanding tokenization helps demystify why models behave certain ways—like struggling with misspellings or counting characters accurately. The series continues with deeper dives into transformer architecture.

React