Learn Before
Formula

Formula for the Expansion of the Search Space at Each Step

In sequence generation, the set of sequences generated at step ii, denoted YiY_i, can be obtained by expanding each sequence in the previous set Yi1Y_{i-1} with all possible next tokens from the vocabulary VV. This is expressed recursively as the Cartesian product: Yi=Yi1×VY_i = Y_{i-1} \times V. This operation denotes that each sequence in Yi1Y_{i-1} is concatenated with each token in VV. However, if a sequence in Yi1Y_{i-1} is already complete (for instance, ending with an EOS\langle \mathrm{EOS} \rangle token), it will not be expanded any further.

0

1

Updated 2026-05-03

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