NLG Parameters and Algorithms
There are different decoding methods which are Greedy Search, Beam Search, Top-K sampling, and Top-p sampling.
The Greedy algorithm selects a word with the highest probability as the next word.
Beam Search chooses a word structure that has the highest probability of a defined number of beams. It uses ngrams to avoid repetitions.
Sampling top-k gives the most likely next word by redistributing the probability mass among the K next words.
Top-p sampling chooses from the smallest possible set of words whose cumulative probability exceeds the probability p. The probability mass is then redistributed among this set of words.