Example

Example of K-Best Selection with a Beam Width of 3

This example illustrates the K-best selection process with a beam width (K) of 3. Given five candidate words with their respective probabilities—'cute' (Pr=0.34), 'on' (Pr=0.32), 'sick' (Pr=0.21), 'are' (Pr=0.12), and '.' (Pr=0.01)—the process involves two steps. First, the candidates are ranked by their probability scores. Second, the top K=3 candidates ('cute', 'on', 'sick') are selected as the output, forming the beam. The remaining candidates with lower scores ('are', '.') are discarded or 'pruned'.

Image 0

0

1

Updated 2025-10-10

Contributors are:

Who are from:

Tags

Ch.5 Inference - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences