# What is temperature?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-is-temperature%2F11924%3E%5C
**Category:** Beginners\
**Created:** [November 17, 2021, 12:33am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-is-temperature%2F11924 "2021-11-17T00:33:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kforcode](https://avatars.discourse-cdn.com/v4/letter/k/57b2e6/32.png) [@Kforcode](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKforcode)%5C
**Post date:** [November 17, 2021, 12:33am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-is-temperature%2F11924%2F1 "2021-11-17T00:33:32Z")

</div>

I see the word “temperature” being used at various places like:

1. in [Models — transformers 4.12.4 documentation](https://huggingface.co/transformers/main_classes/model.html?highlight=generate)

- **temperature** ( `float` , optional, defaults to 1.0) – The value used to module the next token probabilities.

1. temperature scaling for calibration
2. temperature of distillation

can anyone please explain what does it mean, or point me to a source with explanation?

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnielsr)%5C
**Post date:** [November 17, 2021, 9:40am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-is-temperature%2F11924%2F2 "2021-11-17T09:40:29Z")

</div>

This is very well explained in [this Stackoverflow answer](https://stackoverflow.com/a/63471046/7762882).

You can also check out our [blog post](https://huggingface.co/blog/how-to-generate) on generating text with Transformers, that also includes a description of the temperature.

---

<div class="post-metadata">

**Author:** ![Kforcode](https://avatars.discourse-cdn.com/v4/letter/k/57b2e6/32.png) [@Kforcode](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKforcode)%5C
**Post date:** [November 17, 2021, 11:15am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-is-temperature%2F11924%2F3 "2021-11-17T11:15:48Z")

</div>

Thanks a lot @nielsr
