XiangLi1999 / ContrastiveDecoding

contrastive decoding
173 stars 11 forks source link

Question about typical decoding baseline #3

Open dlvp opened 1 year ago

dlvp commented 1 year ago

Hello @XiangLi1999 and @ari-holtzman, I'm trying to follow the implementation of the typical decoding baselines in the code base. Here a typical argument is passed, but the generate method does not accept any such argument but only an optional argument typical_p. At the same time I am unable to find any call to model_kwargs['"typical"] anywhere so it seems no warping of the logits to do typical sampling is ever performed. Am I missing something trivial?

XiangLi1999 commented 1 year ago

Hi,

Thanks for pointing this out! I think this is my bad, the right thing is to change "typical=0.95" to "typical_p=0.95". I will fix this code release and double check my experiments. This might just be something I dropped when migrating my code base from dev to release.

Thanks again!