13/29
Part 3 of 6 · Top-kWatch
Watch · 8 min

Raschka codes top-k: keep the k largest logits, set the rest to minus infinity, and take the softmax, so only those k tokens can be drawn.

Build an LLM from Scratch 5: Pretraining on Unlabeled Data · Sebastian Raschka · Mar 2025YouTube