Loading slide

The sampler chooses

A separate piece of software receives Rufus’s scores.

First, the scores are turned into probabilities that add up to 100%. Then a small program called the sampler uses those probabilities to choose one token.

In a simplified example:

2418 → Hi: 60%

9906 → Hello: 30%

6712 → Thanks: 10%

A higher probability makes a token more likely to be chosen, but it does not guarantee the choice. Across many identical runs, Hi would be selected more often than Hello or Thanks, but any of the three could be chosen.

For this reply, the sampler selects:

2418 → Hi

Rufus produced the scores. The sampler made the selection.

# did you know?

Always choosing the most likely token can make replies repetitive. Sampling allows different plausible replies, but too much randomness can make them harder to follow.

# citations(1)↓
  1. [1]huggingface.co

Loading contents...

[█████░░░░░░░░░░░░░][████████░░░░░░░░░░░░░░░░░░░░]10 / 35
<back>next