Cited by 62Topic ModelingNatural Language Processing TechniquesAdversarial Robustness in Machine Learning

Exploring the Impact of Temperature on Large Language Models: Hot or Cold?

Open access
Li, Lujun, Sleem, Lama, Gentile, Niccolo’, Nichil, Geoffrey, State, Radu·2025·Procedia Computer Science

Abstract

The sampling temperature, a critical hyperparameter in large language models (LLMs), modifies the logits before the softmax layer, thereby reshaping the distribution of output tokens. Recent studies have challenged the “Stochastic Parrots” analogy by demonstrating that LLMs are capable of understanding semantics rather than merely memorizing data and that randomness, modulated by sampling temperature, plays a crucial role in model inference. In this study, we systematically evaluated the impact of temperature in the range of 0 to 2 on data sets designed to assess six different capabilities, conducting statistical analyses on open source models of three different sizes: small (1B–4B), medium (6B–13B), and large (40B–80B). Our findings reveal distinct skill-specific effects of temperature on model performance, highlighting the complexity of optimal temperature selection in practical applications. To address this challenge, we propose a BERT-based temperature selector that takes advantage of these observed effects to identify the optimal temperature for a given prompt. We demonstrate that this approach can significantly improve the performance of small and medium models in the SuperGLUE datasets. Furthermore, our study extends to FP16 precision inference, revealing that temperature effects are consistent with those observed in 4-bit quantized models. By evaluating temperature effects up to 4.0 in three quantized models, we find that the “Mutation Temperature”—the point at which significant performance changes occur—increases with model size 1 .

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1016/j.procs.2025.07.135

Cites

25 of 25 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

Flagged first, then by citations

Cited by

Sorted by citations

Authors
Li, L., Sleem, L., Gentile, N., Nichil, G., & State, R.
Affiliations
University of Luxembourg (LU)
Corresponding author
Li, Lujun
Venue
Procedia Computer Science
Publisher
Elsevier BV
Published
2025
Volume
264
Pages
242-251
ISSN
1877-0509 (ISSN-L)
OpenAlex
W4413167964
Cited by
62
References
23
Citations by year
2026: 49 · 2025: 13
FWCI
43.27
Type
conference paper
Language
en
Open access
Locations
  • Procedia Computer Science (publishedVersion, cc-by)
  • arXiv (Cornell University) (submittedVersion)
  • Open Repository and Bibliography (University of Luxembourg) (submittedVersion, other-oa)
  • arXiv (Cornell University)
Funders
Nvidia
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
  • Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
Keywords
sampling temperature, large language models, temperature selection, SuperGLUE, model size effects, quantized models, 4-bit quantization, token distribution

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review