How the final hidden state becomes a predicted next token: the last token's vector is multiplied by the unembedding matrix to produce one logit per vocabulary word, then softmax turns those into probabilities that are sampled.
Pick the next word
Scores become probabilities — temperature decides how bold the pick is.