The article explores how a small language model, trained on a dataset of Shakespeare's plays, predicts the next token in a sequence. The author proposes a theory that each transformer block learns to associate a given prompt with a class of strings found in the training corpus, and outputs a distribution of tokens that follow those strings. The model is able to produce plausible, albeit nonsensical, text that mimics the style of Shakespeare. The author also provides an imperative code implementation of their proposed explanation, which produces similar outputs to the original model.