Small issue in nucleus sampling explanation + implementation
ascher8 opened this issue · 0 comments
ascher8 commented
In the file <labml_nn/sampling/nucleus.py> there seem to be two issues.
"That is, we pick the highest probable tokens until the sum of their probabilities is less that
And in the code implementation, line 62 should be flipped to a >= from what it is currently:
nucleus = cum_sum_probs < self.p
I'm new to github and just learned what nucleus sampling is 10 minutes ago, so sorry if this Issue was improperly formatted or wrong or anything.