A model does not pick a word. It produces one row of numbers, and everything that decides which token you see happens afterwards. Step through that afterwards — softmax, temperature, top-k, top-p, and the draw itself — on one seeded example you can follow end to end.
Step through at your own pace · prerequisites: none beyond knowing what a logit is
Start with Softmax — every later tab operates on the distribution it builds. Two prompts run throughout: a focused one ("The cat sat on the ___"), where the model is nearly certain, and an open one ("On Saturday I went down to the ___"), where a dozen continuations are about equally good. That pairing is the point: the Top-p tab shows a case where top-k and top-p choose genuinely different candidate sets, in opposite directions on the two rows, which is the whole argument for nucleus sampling. The Softmax tab also checks its own arithmetic — that the row sums to 1, that subtracting the max changes nothing, and that skipping it returns NaN.
mulberry32 is not a cryptographic generator and a real server's RNG is not either — but "uniform on [0,1)" is all the inverse-CDF draw needs, and seeding it is what makes the counts on the last tab identical on every reload.