Temperature

An inference parameter controlling randomness — higher values make output more varied.

Temperature is a scaling factor applied to a model’s probability distribution over possible next tokens before sampling. Near 0, the model almost always picks the highest-probability token, producing consistent, near-deterministic output. As temperature rises, lower-probability tokens become more likely, increasing diversity at the cost of coherence. In Amazon Bedrock, temperature is set alongside Top P and Top K as inference parameters. A key exam distinction: temperature reshapes the entire probability distribution, whereas Top P caps sampling to the most probable tokens whose cumulative probability meets a threshold — the two controls are complementary, not synonymous.

PlayPrepHQ study notes are written and reviewed against primary exam sources. How we create & review content →

Related terms

Back to Applications of Foundation Models