How a language model writes

    What happens after you press Enter

    You type a sentence into an AI assistant and a reply appears, a word at a time. This walkthrough follows one sentence through a real language model in six steps. No maths needed.

    The model has one job: choose what comes next. The orange box shows it choosing, again and again, in proportion to its own probabilities.

      About the model on this page. Everything you can click here was computed by GPT-2, a small language model that OpenAI released publicly in 2019. It is the same kind of system as the assistants you use at work, at a size small enough to open up and look inside. The final page shows what changes at full scale.