Introduction
When working with Large Language Models (LLMs), developers frequently encounter tokenizers—AutoTokenizer, tiktoken, SentencePiece, or WordPiece. A natural question arises:
Why isn’t there a standalone “tokenization model,” like there are embedding and transformer models?
This article explains why tokenization is not treated as a neural model, how tokenizers actually work, and why they are always tightly coupled with language models.
What Tokenization Really Is
Tokenization is the process of converting raw text into discrete units called tokens, which can be:
Words (
"hello")Subwords (
"play" + "ing")Characters
Byte-level units
Example:
"I am learning NLP"
→ ["I", "am", "learn", "ing", "NLP"]These tokens are later mapped to token IDs, which are numerical indices used by neural networks.
Why Tokenization Is Not a Neural Model
Tokenization Is Deterministic, Not Predictive
A neural model:
Learns patterns
Makes predictions
Produces probabilities
A tokenizer:
Applies fixed rules
Uses a static vocabulary
Always produces the same output for the same input
Input: "ChatGPT"
Output tokens: always the sameThere is no inference, no gradients, and no learning during runtime.
Tokenizers Are Algorithms + Lookup Tables
Modern tokenizers are built using algorithms such as:
| Algorithm | Used By |
|---|---|
| BPE (Byte Pair Encoding) | GPT, RoBERTa |
| WordPiece | BERT |
| SentencePiece | T5, LLaMA |
| Byte-level BPE | GPT-2 |
These consist of:
A merge rules file
A vocabulary file
A normalization pipeline
This is fundamentally different from neural network weights.
Tokenization Happens Before the Model
LLM pipelines look like this:
Text- Tokenizer (rules + vocab)- Token IDs- Embedding Layer- Transformer Layers- OutputThe tokenizer is outside the neural network graph.
Since it doesn’t participate in training or inference, it isn’t treated as a "model".
Why Tokenizers Are Bundled with Models
Each LLM is trained using a specific tokenizer.

Join the conversation! Your thoughts help the community grow.