Locally Typical Sampling is a decoding method that keeps only those next-word candidates whose information content (how surprising the word is) is close to the average information content of the context (the entropy), and samples randomly from them. It was proposed by Meister et al. (2023). Unlike Top-k sampling and Nucleus sampling, it removes not only words with very low probability but sometimes also words that are too predictable.
The method starts from a linguistic observation about how people choose the words they use.
- People try to convey information as efficiently as possible while avoiding misunderstanding.
- As a result, they tend to avoid both very surprising words (too much information, hard to convey) and obvious words (too little information, wasteful), and speak so that the information per word stays roughly constant.
The paper explains that methods that always pick high-probability words (such as beam search) tend to produce dull or repetitive text because they string together words that carry little information. Locally Typical Sampling prevents this by restricting the candidates at each step to words with a "human-like" amount of information.

