Instead of just the most likely tokens, typical sampling keeps the tokens whose surprisal (−log p) is CLOSEST to the distribution’s own entropy — the ‘expected amount of information’. It drops both the boringly-certain tokens and the bizarrely-rare ones, which tends to read more human. Slide the typical mass and watch the kept set hug the entropy.
Locally typical sampling (Meister et al. 2022) ranks tokens by |−log pᵢ − H| — the absolute gap between each token’s surprisal and the distribution’s entropy H = −Σp log p — then keeps the smallest-gap tokens until their mass reaches τ. This favours tokens carrying about the AVERAGE amount of information, excluding both the near-certain (surprisal ≪ H) and the freak-rare (surprisal ≫ H). A fail-loud self-check throws unless the token nearest to H is kept while an extreme one can be dropped. ◆ real decoding, node-verified.
The 6-token distribution is illustrative; the |surprisal − H| ranking is the exact typical-sampling criterion. Whether typical reads ‘more human’ than nucleus is an empirical claim from the paper, not proven here.