Loading slide

Loading contents...

[░░░░░░░░░░░░░░░░░░][░░░░░░░░░░░░░░░░░░░░░░░░░░░░]0 / 19
<back>next

Module 6 Chapter 2

Tokens

A computer has no way to hold a word. It holds numbers, and nothing else. So before a model can do anything with a sentence, the sentence has to be broken into pieces, and each piece swapped for a number.

Deciding how big those pieces should be turns out to be a real problem with no clean answer, and the compromise everyone settled on is stranger than it sounds. The pieces are not words. Some are, some are halves of words, and some are a word with the space in front of it still attached. They are called tokens, and a separate program cuts them before the model receives a thing.

That cutting happens out of sight, and it explains a surprising amount of what models get strangely wrong. It also decides who pays more, because the pieces were chosen by reading one particular pile of text, and not everybody's language was in that pile.

None of it gives the model any meaning yet. At the end of the cutting, each piece has a number, and a number is still only a name tag.

In this chapter

  • Choosing a sizewhy neither whole words nor single letters will do
  • The letters it cannot seewhat gets lost when a word arrives pre-cut
  • Paying by the piecewhy the same sentence costs more in some languages
  • Enough pieces for everythinghow a small fixed set can spell any language on Earth
  • Still only a name tagwhy a piece's ID says nothing yet about meaning
# citations