Skip to content
AImpact
IT EN
Inference Intermediate Also known as: Campionamento top-k

Top-k Sampling

/top-kay sampling/

A next-token selection strategy that keeps only the k most likely candidates and discards the rest before sampling.

ShareLinkedInX

In practice

With k=1 it becomes greedy decoding; with large k it is almost the full distribution again. It is used to stop the model from picking absurd words from the tail. Modern APIs often replace or combine it with top-p, which is considered more adaptive.

Related terms

Seen in the wild

0 entries mentioning it

No archive entry mentions it explicitly. Appears in broader contexts.

← All terms