Unboxed · Chapter 2 · Auf Deutsch

The next word

Where does the map from the first chapter come from? From a fairly simple game: take a sentence from a real text, cover up the next word and let the model guess.

At first it guesses completely at random. After every attempt the right word is revealed, and the model is adjusted a tiny bit so that it is more likely to be right next time. That is all there is to learning. Only not a few times, but trillions of times, with sentences from books, newspapers and the internet.

Try it yourself: let the model learn the two practice sentences. Then see what it guesses for the sentences it has never practised.

Practice sentences
Never practised


    Learned, not memorised

    The model never practised the strudel sentence and still guesses right. It didn’t memorise a sentence. It learned something general: whatever goes with Kaiserschmarrn probably goes with strudel too, because the two live close together on the map.

    That is how the map from the first chapter comes about: as a side effect of guessing. Words that are followed by the same things move closer together on their own while the model practises.

    And when a model writes a whole text? It does nothing else: it guesses the next word, adds it, and guesses again.