Article (Scientific journals)
Exploring the Impact of Temperature on Large Language Models: Hot or Cold?
LI, Lujun; SLEEM, Lama; GENTILE, Niccolo et al.
2025In Procedia Computer Science, 264, p. 242-251
Peer reviewed
 

Files


Full Text
1-s2.0-S1877050925021854-main.pdf
Author postprint (520.69 kB)
Download

All documents in ORBilu are protected by a user license.

Send to



Details



Keywords :
Large Language Models; Sampling Temperature; Model Performance Evaluation; BERT-based Classifier; GPT-based Evaluation
Abstract :
[en] 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 size1.
Disciplines :
Computer science
Author, co-author :
LI, Lujun  ;  University of Luxembourg > Interdisciplinary Centre for Security, Reliability and Trust (SNT) > SEDAN
SLEEM, Lama  ;  University of Luxembourg > Interdisciplinary Centre for Security, Reliability and Trust (SNT) > SEDAN
GENTILE, Niccolo ;  University of Luxembourg > Faculty of Humanities, Education and Social Sciences > Department of Behavioural and Cognitive Sciences > Team Conchita D AMBROSIO
Nichil, Geoffrey
STATE, Radu  ;  University of Luxembourg > Interdisciplinary Centre for Security, Reliability and Trust (SNT) > SEDAN
External co-authors :
yes
Language :
English
Title :
Exploring the Impact of Temperature on Large Language Models: Hot or Cold?
Publication date :
13 August 2025
Journal title :
Procedia Computer Science
eISSN :
1877-0509
Publisher :
Elsevier, Amsterdam, Nl
Volume :
264
Pages :
242-251
Peer reviewed :
Peer reviewed
Focus Area :
Computational Sciences
Commentary :
International Neural Network Society Workshop on Deep Learning Innovations and Applications 2025
Available on ORBilu :
since 10 September 2025

Statistics


Number of views
71 (6 by Unilu)
Number of downloads
51 (1 by Unilu)

Scopus citations®
 
2
Scopus citations®
without self-citations
2
OpenCitations
 
0
OpenAlex citations
 
10

Bibliography


Similar publications



Contact ORBilu