Bitware News
Easy reading

What a token is (how chatbots chop text)

A plain-language guide to tokens as text chunks a language model works with: why systems split rare words into pieces, how BPE and subword units fix a fixed vocabulary, and why context windows count tokens, not pages.

Easy reading

Primary source: Sennrich, Haddow & Birch, Neural Machine Translation of Rare Words with Subword Units (ACL 2016): BPE / subword units: https://doi.org/10.18653/v1/P16-1162

When people talk about chatbots “reading” your prompt, it can sound like the software sees whole sentences the way you do. Under the hood, the first step is quieter: chop the text into tokens.

A token is a chunk of text the model works with, often a whole common word, often only a piece of a rarer one, sometimes punctuation or a fragment with a space glued on. Not a thought. Not a sentence on a shelf. A unit the network can count, weigh, and predict next.

Nothing in that picture is conscious. Chatbots are one product family that runs on tokens. They are not the whole of AI.

The short version

  1. A token is a text chunk the model uses as its alphabet of pieces (word, word-piece, or symbol), not always a whole dictionary word.
  2. Systems chop because they need a fixed vocabulary: a finite list that can still cover rare words, names, typos, and many languages.
  3. Subword methods (including BPE) keep frequent chunks whole and split the rest into reusable pieces.
  4. A context window is measured in tokens, not pages. Long pastes and long replies burn that budget fast.
  5. Next-token prediction sits under many chat products, see What ChatGPT is (and isn’t). Training nudges parameters via the loop in How a model learns.

Chunks, not always whole words

Picture sorting mail into fixed bins. “the”, “and”, and “ing” show up constantly, so they earn their own labels. A long rare string does not. A tokenizer might break it into familiar pieces (un + believ + able, or smaller bits) so the model can reuse patterns it already saw.

That is why demos sometimes show odd mid-word splits. The model is not “confused about spelling” in a human sense. It is operating on the vocabulary units it was trained with. Common words often map to one token. Names, code identifiers, other scripts, and fresh slang often map to several.

Gloss once: token ≠ word. Sometimes they line up. Often they do not.

Why chop: fixed lists and rare words

Language models work best with a closed list of symbols. You cannot hand the network every string anyone might type. You pick (or learn) a vocabulary of manageable size, and you need that list to cover everyday text and the long tail.

Whole-word-only lists struggle with rares: unseen forms fall into an “unknown” bucket, or the vocabulary balloons until training hurts. Character-only lists make sequences very long and force the model to rebuild word-like patterns from scratch.

Subword units sit in the middle. Frequent chunks stay whole. Rare words shatter into pieces the model already knows how to combine. That helps many languages and messy real text (compounds, morphology, borrowed names) share statistical strength.

The primary source for this piece is Sennrich, Haddow & Birch, Neural Machine Translation of Rare Words with Subword Units (ACL 2016). They adapt byte-pair encoding (BPE): start from a fine grain, repeatedly merge the most frequent adjacent pairs, and stop at a target vocabulary size. Rare words then become sequences of those units instead of vanishing into “unknown.” In plain words: learn reusable scraps so leftovers still cook.

Chat product tokenizers differ in detail (BPE cousins, WordPiece, Unigram, byte-level variants). The news-readable claim stays stable: text becomes a sequence of IDs from a fixed piece list.

Context windows count tokens, not pages

When a lab advertises a “128k context,” they mean roughly how many tokens of prompt plus reply fit in one go, not how many printed pages you could skim.

A short question might cost a handful of tokens. A pasted contract, a big code file, or a long chat history can burn thousands. The reply often spends from the same budget. So “it forgot what I said earlier” is often a window story, not a mind wandering off. Attention (weighted look-back over tokens still in view) only operates inside what fits; see What attention means. Billion-parameter headlines are a different axis: What parameters mean.

APIs and chat UIs often meter tokens in and out for the same reason: that is the unit the stack processes.

From chopped text to a chat reply

Once text is tokens, the core loop matches What ChatGPT is (and isn’t): given the pieces so far, score what is likely next, emit one, repeat. Training nudged huge piles of knobs so those scores get less wrong on practice data (How a model learns).

Chopping is upstream of all of that. Surprising tokenization can make the same English sentence “look” longer or stranger to the model than it looks to you. Plumbing, not wisdom: fluency still does not install a truth sensor.

Easy → technical doors

If you’re curious about… Easy / History next step Technical door
Chat product vs next-token engine What ChatGPT is (and isn’t) InstructGPT via that post
Weighted look-back over tokens What attention means Vaswani et al. via that post
Knobs training adjusts What parameters mean Kaplan et al. via that post
Guess → error → update How a model learns Optimizers / backprop via that post
BPE / subword units for rare words This piece’s primary source Sennrich et al., Subword Units (ACL 2016)

The honest caveat

A token is a chunking unit: how chatbots and related language models turn messy text into a finite alphabet of pieces so rare words, many languages, and long prompts become countable sequences. Subword methods such as BPE were a practical answer to fixed vocabularies; context windows then meter those pieces, not human pages. Chopping does not create understanding, feelings, or a guarantee of truth. Use the idea to read length limits and “context” headlines; use the paper when you want the original translation-era recipe. On this site, Easy reading aims for clear claims, clear limits, and a path to the primary source when you want to verify.