Bitpath

Lesson 1 · Unit 01

Tokens

Byte-pair encoding, built by hand

12 exercisesabout 3 min

What you practise

  • Why not characters or words, byte-pair encoding built by hand (merge the most common pair), vocabulary size, why token counts and letter-counting behave oddly

Try a question from this lesson

Pick one

A model needs text as numbers. Suppose every whole English word in a dictionary gets its own number. What breaks first?

The idea

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

Tokens are pieces of words

A tokenizer cuts text into tokens and swaps each one for its id, its row number in the vocabulary.

Common words are a single token. Rare words are split into a few common pieces, so nothing is ever "unknown". The ids below are made up; real ones depend on the tokenizer.

"unbelievable!"

un | believ | able | !
403    9173    540   0

10 more exercises in the app

  • 3× type the answer
  • 3× multiple choice
  • 1× fill the blanks
  • 1× order the lines
  • 1× true or false
  • 1× match the pairs

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy