What if do_sample=False?

#2
by ErrDivine - opened

The README warns that it's important to set the temperature and top_p as such. I wonder what will happen if I set do_sample=False and use greedy search, because in some research setting this is necessary, like controlling variables on generation.

As far as i understand, do_sample=False will disable the random sampling from the output layer, so it will always select the output token that has the highest score. It will make outputs identical no matter what temperature or top_p parameters are

Yeh, thanks for your kind help. But I think there's more lying underneath that warning. I guess maybe the performance will drop dramatically or the model generation is corrupted. Otherwise they don't have to put a warning that big.

Yeah, the performance can drop. Also it might get stuck in a loop repeating the same words, this is why i think the warning is there

Sign up or log in to comment