Your LLM sees tokens, not prompts: why tokenization shapes cost, context and multilingual quality
mdancho84 · x · 2026-12-02
A long-form primer for data scientists moving into AI engineering: LLMs never see your prompt — they see tokens, and tokenization quietly affects context window limits, API cost, code generation, numbers/identifiers, multilingual performance, embeddings, chat templates and training.
The author also debunks common misconceptions: BPE is not automatically byte-level, SentencePiece is not a tokenization algorithm, and token IDs carry no semantics. The attached image outlines a technical handbook covering Unicode/UTF-8, normalization, BPE and byte-level BPE, SentencePiece/Unigram/WordPiece, special tokens and chat templates, multilingual/code tokenization, context length and cost, and worked edge cases.
More from coding & agent
- Dev returns from 12-day vacation to find Gemini agents still looping on a proof task — jasondeanlee · 2026-12-02
- 7 research-backed agent orchestration patterns, explained in 14 minutes — ykdojo · 2026-12-02
- Fixing Framer MCP agents that rebuild every section from scratch — jonnygcstark · 2026-12-02
- Netlify Open-Sources Video Agent: Turn a Prompt Into an MP4 in Minutes — DavidWells · 2026-12-02
- Obvious launches 'software factories' where agents build autonomously, backed by $1M liability insurance — sharpeye_wnl · 2026-12-02
- Ontologies explained: how Fabric and Databricks give AI agents business context — adnan_hashmi · 2026-12-02