-
Notifications
You must be signed in to change notification settings - Fork 25.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
model.generate temperature parameter is completely ineffective #22405
Comments
Hey @AndreaSottana 👋 I would recommend reading our blog post on how to generate. TL;DR -- there are several generation modes, and not all We are aware that our |
Hi @gante |
System Info
transformers
version: 4.26.1Who can help?
@gante @sg
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Hello,
I am trying to generate text using different models and different temperature parameters. I have noticed, however, that while changing hyperparameters such as
num_beams
affects the output text, changing thetemperature
parameter doesn't seem to do anything, and setting a temperature to 0.0 or 1.0 (very different) always leads to the same output. This has been observed across multiple different language models. I suspect this might be a bug such that the set temperature is not shown to the model. In order to reproduce, run the example below (feel free to try with different text samples to convince yourself it's not a one-off occurrence)Expected behavior
I would expect the two printed outputs to be different. I understand that occasionally they might be the same, but I've tried with over 1,000 different inputs, and the generated outputs with
temperature=0
andtemperature=1
are ALWAYS the same which means there is something wrongThe text was updated successfully, but these errors were encountered: