From 6350eff76c49df980f4503fe76fcdbd935042ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?EasyArch=E7=A4=BE=E5=8C=BA=E2=80=94=E5=BF=83?= <54020930+EasyArch-Heart@users.noreply.github.com> Date: Sat, 2 Aug 2025 07:48:12 +0800 Subject: [PATCH] Update beam-search_origin.md. revised the parts where I believed the description was not accurate I don't think should choose the two largest ones from the ten, because the largest values may also exist in the above five. --- chapter_recurrent-modern/beam-search_origin.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter_recurrent-modern/beam-search_origin.md b/chapter_recurrent-modern/beam-search_origin.md index b16a1fcc3..2c296cddd 100644 --- a/chapter_recurrent-modern/beam-search_origin.md +++ b/chapter_recurrent-modern/beam-search_origin.md @@ -170,13 +170,13 @@ suppose that the tokens with the highest conditional probabilities $P(y_1 \mid \ $$\begin{aligned}P(A, y_2 \mid \mathbf{c}) = P(A \mid \mathbf{c})P(y_2 \mid A, \mathbf{c}),\\ P(C, y_2 \mid \mathbf{c}) = P(C \mid \mathbf{c})P(y_2 \mid C, \mathbf{c}),\end{aligned}$$ -and pick the largest two among these ten values, say +and pick the largest one from the above five values and the largest one from the following five values respectively, say $P(A, B \mid \mathbf{c})$ and $P(C, E \mid \mathbf{c})$. Then at time step 3, for all $y_3 \in \mathcal{Y}$, we compute $$\begin{aligned}P(A, B, y_3 \mid \mathbf{c}) = P(A, B \mid \mathbf{c})P(y_3 \mid A, B, \mathbf{c}),\\P(C, E, y_3 \mid \mathbf{c}) = P(C, E \mid \mathbf{c})P(y_3 \mid C, E, \mathbf{c}),\end{aligned}$$ -and pick the largest two among these ten values, say +and pick the largest one from the above five values and the largest one from the following five values respectively, say $P(A, B, D \mid \mathbf{c})$ and $P(C, E, D \mid \mathbf{c}).$ As a result, we get six candidates output sequences: (i) $A$; (ii) $C$; (iii) $A$, $B$; (iv) $C$, $E$; (v) $A$, $B$, $D$; and (vi) $C$, $E$, $D$.