Remark: `do_sample` is set to `False`. However, top_p is set to 0.9

#5
by Pwicke - opened

Hello,
I am receiving the following error based on your example:
ValueError: 'do_sample' is set to 'False'. However, top_p is set to 0.9 -- this flag is only used in sample-based generation modes. Set 'do_sample=True' or unset top_p to continue.

Just to let you know that there might be an issue with the example on the model page. The only difference is that I am using a downloaded version of the model, but that is probably not the source of error.

If I set do_sample=True it works for me as intended.

Looks like it's reported by several people: https://github.com/huggingface/transformers/issues/25388

Thanks for notifying, expect a fix soon!

nielsr changed discussion status to closed

Sign up or log in to comment