System Info
- `transformers` version: 4.44.2
- Platform: Linux-5.15.0-91-generic-x86_64-with-glibc2.35
- Python version: 3.11.9
Who can help?
@gante @SunMarc
Information
Tasks
Reproduction
When creating a GenerationConfig instance with the following code:
>>> from transformers import GenerationConfig
>>> GenerationConfig(do_sample=False, temperature=0.0)
I encounter the following warning:
UserWarning: `do_sample` is set to `False`. However, `temperature` is set to `0.0` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `temperature`. This was detected when initializing the generation config instance, which means the corresponding file may hold incorrect parameterization and should be fixed.
I don't believe these two parameters conflict with each other. Additionally, I am curious why the default temperature value is set to 1.0 when do_sample is False by default, indicating that greedy sampling is the default setting.
Expected behavior
- No warning should be issued when do_sample=False and temperature=0.0.
- Clarification on why the default temperature is 1.0 when do_sample=False.
System Info
Who can help?
@gante @SunMarc
Information
Tasks
examplesfolder (such as GLUE/SQuAD, ...)Reproduction
When creating a GenerationConfig instance with the following code:
I encounter the following warning:
I don't believe these two parameters conflict with each other. Additionally, I am curious why the default temperature value is set to 1.0 when do_sample is False by default, indicating that greedy sampling is the default setting.
Expected behavior