{
 "slug": "Tokenization",
 "title": "Tokenization",
 "type": "concept",
 "short_desc": "The conversion of raw text into the integer token ids that language models read and write, dominated by byte-pair encoding variants with vocabularies of tens to hundreds of thousands of tokens.",
 "categories": [
  "Concepts",
  "Training methods"
 ],
 "infobox": {
  "Introduced": "Byte-pair encoding for compression (Gage, 1994); adapted to neural translation by Sennrich et al., 2015",
  "Field": "Natural language processing, data preprocessing",
  "Used in": "Every modern large language model",
  "Key papers": "arXiv:1508.07909, arXiv:1808.06226, arXiv:1810.04805"
 },
 "infobox_links": {
  "Used in": [
   "Large_language_model"
  ]
 },
 "aliases": [
  "BPE",
  "Byte-pair encoding",
  "SentencePiece",
  "tiktoken"
 ],
 "family": "",
 "org": "",
 "registry_status": "stub",
 "words": 1750,
 "references": 19,
 "outbound": [
  "BERT",
  "Embedding_(machine_learning)",
  "GPT-2",
  "GPT-3",
  "GPT-3.5",
  "GPT-4",
  "GPT-4o",
  "Gemma",
  "Large_language_model",
  "Llama_(model_family)",
  "Llama_3",
  "Next-token_prediction",
  "OpenAI",
  "Pretraining",
  "Qwen_(model_family)",
  "Softmax",
  "T5",
  "Teacher_forcing"
 ],
 "inbound": [
  "Andrej_Karpathy",
  "Cross-entropy_loss",
  "Embedding_(machine_learning)",
  "GPT-1",
  "GPT-3",
  "GPT-4o",
  "Hybrid_architecture_(LLM)",
  "Large_language_model",
  "Pretraining",
  "Vision_Transformer"
 ],
 "url": "wiki/Tokenization.html",
 "built": "2026-07-24"
}
