Closed belerico closed 2 weeks ago
Thanks for all the updates and fixes. It looks all great to me now. ~The only thing is perhaps adding one more unit test, but I can take care of that to make it easier.~ [done]
Thanks for all the updates and fixes. It looks all great to me now. ~The only thing is perhaps adding one more unit test, but I can take care of that to make it easier.~ [done]
Thank you @rasbt: i had missed your comment
No worries at all, I also thought it was probably quicker to just add instead of explain 😅
This PR adds the nucleus-sampling (aka top-p sampling) as specified from https://arxiv.org/abs/1904.09751. In top-p sampling the next token is chosen from the smallest set of tokens with a cumulative probability greater than
top-p
, i.e. by selecting the highest probability tokens whose cumulative probability exceeds thetop-p
threshold.