Skip to content

Glossary: Transformers Basics

Top-k sampling

Also written: top-k

Sampling only from the k likeliest tokens, after setting all others' logits to minus infinity.

Where the book teaches it

Related terms

Top-p samplingSampling