From an example to a next-token prediction 00:00:01 The parcel dispatch desk The notice says, “Delivery arrives on,” and the next word is missing. Mae works the parcel desk. Monday would finish the sentence beautifully. If she puts that on the shipping label, will the parcel actually turn up on Monday? On her screen are exactly three words and a cursor. Behind it is a network that learned patterns in training text. Behind the counter is a different machine, a scanner connected to the carrier. Leave that scanner off for a moment. When people saw this particular prefix during training, some continuations were more common or easier to predict in context. The model compresses such regularities into weights. It can use them even for a sentence it has never seen before. 00:00:46 Three candidates enter the sorter Imagine a tiny vocabulary containing just Monday, Tuesday and Friday. The network gives them scores of two, one and zero. These raw scores are called logits. A zero here still leaves Friday in the running. Exponentiating gives about seven point four, two point seven and one. Together they weigh just over eleven. Divide each contribution by the total. Monday now gets about sixty-seven percent of the probability, Tuesday twenty-four percent, and Friday nine percent. Mae chooses the most likely token for this demonstration. The sorter prints Monday. If she sampled from the full distribution instead, Tuesday and Friday would sometimes appear. Which day did either method confirm with the carrier? None. 00:01:36 Print the next strip Slide the new word into the notice. The prefix now reads, “Delivery arrives on Monday.” To predict what follows, the model uses that longer prefix. Punctuation might become plausible where a weekday was plausible a moment ago. The first step supplied its output as input to the second step. Nothing about printing Monday changed the trained weights. During training an observed target gives a loss and a gradient. During this ordinary generation run, Mae is only applying the learned network. Try the prefix again with Tuesday already written on the strip. The next distribution can change even though she is using the same model. Each step depends on the choices that have become part of the text. 00:02:19 Check the carrier record Mae now has two pieces of paper. One says the model favored Monday. The other is the dated scan for this parcel from the carrier. A customer asks when this particular delivery is scheduled. Which paper should she reach for? She checks that the tracking number matches the parcel, then reads the carrier’s scheduled day. If the scan says Tuesday, she reports Tuesday as the scheduled date. A delivery estimate can change, so she keeps the scan time with it. Follow the two paths back to the desk. Scores gave Mae a continuation. The longer prefix let her generate another token. A separate, current observation let her answer the customer’s question about the world.