baize-chatbot icon indicating copy to clipboard operation
baize-chatbot copied to clipboard

Does prob_sum in greedy search always add up to 1?

Open qrdlgit opened this issue 1 year ago • 1 comments

https://github.com/project-baize/baize/blob/ccf0bb8485657b7c16a57456bbb835503bac2456/demo/app_modules/utils.py#L278

Was just looking through the code. Doesn't softmax ensure that all the elements add up to 1?

qrdlgit avatar Apr 05 '23 18:04 qrdlgit

This is for top-p sampling. We mask out tokens outside top-p (by default 95%).

JetRunner avatar Apr 06 '23 10:04 JetRunner