Перейти к содержимому
Меню
Русский

Top-p Sampling vs Beam Search

Sampling only from the smallest set of tokens whose probabilities reach p.

Сравнение по критериям

Для этих двух технологий пока не зафиксированы сравнимые характеристики.

Что выбрать?

Сформировано из различий выше по фиксированным правилам, а не моделью.

Choose Top-p Sampling if…

Ни одна из зафиксированных характеристик не говорит в его пользу.

Choose Beam Search if…

Ни одна из зафиксированных характеристик не говорит в его пользу.

Об этой странице

Страница остаётся доступной, но исключена из поисковых индексов, пока не наберёт достаточно подробностей со ссылками на источники (PRD SEO-08).

Top-p Sampling

technique · Techniques

Top-p, or nucleus sampling, keeps the most likely tokens until their cumulative probability reaches a threshold, then samples from that set. It solves the problem that a fixed top-k includes nonsense when the distribution is peaked and excludes reasonable options when it is flat. It exists because the set of plausible continuations should be sized by the model's own confidence.

Beam Search

technique · Techniques

Beam search expands several partial sequences at once and keeps the highest-scoring ones, rather than committing to the token chosen at each step. It solves the problem that greedy decoding can be locally optimal and globally poor. It exists as the default for translation and summarisation, and it tends to produce bland text for open-ended generation.