Top-k: keep only the top K most-likely tokens; renormalize. Simple and fast. Awkward when the distribution is very flat (K cuts off too much) or very peaked (K includes garbage).
Top-p (nucleus): keep the smallest set whose cumulative probability ≥ p. Adapts to the distribution shape — keeps fewer tokens when peaked, more when flat. The 2026 default.