Repository navigation
Possible inconsistency in Figure 4.15 #276
leahrosen21
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I noticed a possible inconsistency in the top-p filtering example.
In Listing 4.12, the modified implementation includes the token that crosses the threshold. With
top_p = 0.8, this keeps three tokens. Accordingly, Listing 4.13 places the cutoff atn_kept - 0.5 = 2.5, which is also what I get when running the accompanying notebook.However, Figure 4.15 shows the cutoff at 1.5, corresponding to two tokens. This also seems inconsistent with the caption, which describes keeping the smallest subset whose cumulative probability exceeds the threshold, and with Listing 4.14 and the subsequent discussion, which proceed with three tokens.
Just flagging this in case the figure and its accompanying explanation reflect an earlier version of the implementation.
All reactions