mlsanityData to 14 Oct 2026

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

arXiv 2506.07295 ↗First posted 8 Jun 2025cs.CLcited by 40

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. Cited by 40 papers in the map (data through 14 Oct 2026). Builds on 20 of its 28 references that are in the map. First posted on arXiv 8 Jun 2025.

Builds on

20 of 28 references.

References · 20

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  3. 2019The Curious Case of Neural Text Degenerationcited by 2,916
  4. 2023G-Eval: NLG Evaluation using GPT-4 with Better Human Alignmentcited by 2,276
  5. 2019SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systemscited by 1,729
  6. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
  7. 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,298
  8. 2018Hierarchical Neural Story Generationcited by 1,193
  9. 2023AGIEval: A Human-Centric Benchmark for Evaluating Foundation Modelscited by 716
  10. 2021The FLORES-101 Evaluation Benchmark for Low-Resource and Multilingual Machine Translationcited by 560
  11. 2023Benchmarking Large Language Models for News Summarizationcited by 445
  12. 2023Causal Reasoning and Large Language Models: Opening a New Frontier for Causalitycited by 353
8 more
  1. 2023Art or Artifice? Large Language Models and the False Promise of Creativitycited by 172
  2. 2024The Effect of Sampling Temperature on Problem Solving in Large Language Modelscited by 170
  3. 2024InFoBench: Evaluating Instruction Following Ability in Large Language Modelscited by 135
  4. 2018Language GANs Falling Shortcited by 97
  5. 2024Is Temperature the Creativity Parameter of Large Language Models?cited by 93
  6. 2023Hot or Cold? Adaptive Temperature Sampling for Code Generation with Large Language Modelscited by 38
  7. 2023This is not correct! Negation-aware Evaluation of Language Generation Systemscited by 17
  8. 2023KL-Divergence Guided Temperature Samplingcited by 9

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 11; 2026: 29.

40 papers.

Sort:

By area:

  1. 2025The threat of analytic flexibility in using large language models to simulate human datacited by 15
  2. 2026Hidden Measurement Error in LLM Pipelines Distorts Annotation, Evaluation, and Benchmarkingcited by 10
  3. 2025What Does It Take to Be a Good AI Research Agent? Studying the Role of Ideation Diversitycited by 7
  4. 2026On Calibration of Large Language Models: From Response To Capabilitycited by 7
  5. 2026Natural Language Instructions for Scene-Responsive Human-in-the-Loop Motion Planning in Autonomous Driving using Vision-Language-Action Modelscited by 5
  6. 2026From Reasoning Traces to Reusable Modules: Understanding Compositional Generalization in Language Model Reasoningcited by 5
  7. 2026Agent Skill Framework: Perspectives on the Potential of Small to Medium Language Models in Industrial Environmentscited by 3
  8. 2026The Necessity of Setting Temperature in LLM-as-a-Judgecited by 3
  9. 2026Whose Name Comes Up? II: Benchmarking and Intervention-Based Auditing of LLM-Based Scholar Recommendationcited by 2
  10. 2026Introducing Background Temperature to Characterise Hidden Randomness in Large Language Modelscited by 2
  11. 2026Fine-grained Claim-level RAG Benchmark for Lawcited by 2
  12. 2025CodeChemist: Test-Time Scaling for Low-Resource Code Generation via Functional Knowledge Transfercited by 1
28 more
  1. 2025A Cross-Lingual Analysis of Bias in Large Language Models Using Romanian Historycited by 1
  2. 2025Margin Adaptive DPO: Leveraging Reward Model for Granular Control in Preference Optimizationcited by 1
  3. 2026Do MLLMs See What We See? Analyzing Visualization Literacy Barriers in AI Systemscited by 1
  4. 2026Can LLM Aid in Solving Constraints with Inductive Definitions?cited by 1
  5. 2026An Exploration-Analysis-Disambiguation Reasoning Framework for Word Sense Disambiguation with Low-Parameter LLMscited by 1
  6. 2026The production of meaning in the processing of natural languagecited by 1
  7. 2026When Hate Meets Facts: LLMs-in-the-Loop for Check-worthiness Detection in Hate Speechcited by 1
  8. 2026Generative AI for Visualizing Highway Construction Hazards Through Synthetic Images and Temporal Sequencescited by 1
  9. 2026Persona Conditioning of Brand Recommendations in Retrieval-Augmented Commercial Chat: A Prominence-Stratified Cross-Provider Auditcited by 1
  10. 2026Multilingual Long-Form Speech Instruction Following: KIT's Submission to IWSLT 2026cited by 1
  11. 2025Large Language Models Acing Chartered Accountancycited by 0
  12. 2025Architecting software monitors for control-flow anomaly detection through large language models and conformance checkingcited by 0
  13. 2025NegBLEURT Forest: Leveraging Inconsistencies for Detecting Jailbreak Attackscited by 0
  14. 2025Temperature in SLMs: Impact on Incident Categorization in On-Premises Environmentscited by 0
  15. 2025TempPerturb-Eval: On the Joint Effects of Internal Temperature and External Perturbations in RAG Robustnesscited by 0
  16. 2025Measuring Stability Beyond Accuracy in Small Open-Source Medical Large Language Models for Pediatric Endocrinologycited by 0
  17. 2026Automating the Detection of Requirement Dependencies Using Large Language Modelscited by 0
  18. 2026Toward Epistemic Stability: Engineering Consistent Procedures for Industrial LLM Hallucination Reductioncited by 0
  19. 2026SAATT Nav: a Socially Aware Autonomous Transparent Transportation Navigation Framework for Wheelchairscited by 0
  20. 2026Intersectional Fairness in Large Language Modelscited by 0
  21. 2026SpecFed: Accelerating Federated LLM Inference with Speculative Decoding and Compressed Transmissioncited by 0
  22. 2026Threat Modelling using Domain-Adapted Language Models: Empirical Evaluation and Insightscited by 0
  23. 2026Argument Quality Assessment with Large Language Models: A Pairwise Bradley-Terry Approachcited by 0
  24. 2026The Last Visible Pixel: Probing Fine-Scale Perception in Vision-Language Modelscited by 0
  25. 2026How Temperature Shapes Ideological Discourse in Retrieval-Augmented Generation?cited by 0
  26. 2026Comparing Semantic Navigation in Humans and Large Language Models using Natural Language Processingcited by 0
  27. 2026COMPAS: Difficulty-Aware Joint Search for Optimizing Code Generationcited by 0
  28. 2026LLMs as Post-hoc Auditors of Physiological Plausibility in Symbolic Regression: A Clinician-Evaluated Case Studycited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2025Optimizing Temperature for Language Models with Multi-Sample Inference
  2. 2024Calibrating Language Models with Adaptive Temperature Scaling
  3. 2026Rethinking the Role of Temperature in Large Language Model Distillation
  4. 2026A Guide to Large Language Models in Modeling and Simulation: From Core Techniques to Critical Challenges
  5. 2023Temperature-scaling surprisal estimates improve fit to human reading times -- but does it do so for the "right reasons"?
  6. 2025On the Role of Temperature Sampling in Test-Time Scaling
  7. 2024A Probabilistic Perspective on Unlearning and Alignment for Large Language Models
  8. 2025When Life Gives You Samples: The Benefits of Scaling up Inference Compute for Multilingual LLMs