In a large language model, is the Temperature hyperparameter scaling the logits by…
- User
In a large language model, is the Temperature hyperparameter scaling the logits by multiplying them?
Assistant
Yes, that's correct! In a large language model, the temperature hyperparameter is used during the sampling process to scale the logits, which are the unnormalized log probabilities output by the model. Specifically, the logits are scaled by multiplying them with the temperature value before applying softmax to get the final probability distribution over the vocabulary.
A higher temperature value (e.g., closer to 1) results in a more uniform distribution, introducing more randomness and diversity in the generated text, while a lower temperature value (e.g., closer to 0) results in a more peaked distribution, making the model's output more deterministic and focused on the most likely next word or character.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.