Lab 02 · Prepared demonstration

One text, several tokenizations

Compare two fictional vocabularies and see how the same text becomes sequences of different lengths.

Compare two segmentations

One text, several tokenizations

Change the example and see how two prepared vocabularies represent exactly the same text with different boundaries.

Prepared demonstration
Original textModels learn.

Fictional vocabulary

Compact profile

3 tokens

This prepared vocabulary contains several frequent units from the sentence.

  1. Models
  2. ␠learn
  3. .

Fictional vocabulary

Fragmented profile

5 tokens

This prepared vocabulary needs more fragments to produce exactly the same text.

  1. Mod
  2. els
  3. ␠le
  4. arn
  5. .

A vocabulary may contain a frequent whole word or only fragments that can reconstruct it.

What this demonstration does not show
  • Profiles and identifiers are fictional and prepared locally.
  • No commercial or open-source tokenizer runs here.
  • Real boundaries depend on the algorithm, vocabulary, version, normalization, and exact text.
  • Fewer tokens do not automatically imply a better model or answer.