Lune

ICML2025顶会

Optimizing Temperature for Language Models with Multi-Sample Inference

Weihua Du, Yiming Yang, Sean Welleck

摘要

Multi-sample aggregation strategies, such as majority voting and best-of-N sampling, are widely used in contemporary large language models (LLMs) to enhance predictive accuracy across various tasks. A key challenge in this process is temperature selection, which significantly impacts model performance. Existing approaches either rely on a fixed default temperature or require labeled validation data for tuning, which are often scarce and difficult to obtain. This paper addresses the challenge of automatically identifying the (near)-optimal temperature for different LLMs using multi-sample aggregation strategies, without relying on task-specific validation data. We provide a comprehensive analysis of temperature's role in performance optimization, considering variations in model architectures, datasets, task types, model sizes, and predictive accuracy. Furthermore, we propose a novel entropy-based metric for automated temperature optimization, which consistently outperforms fixed-temperature baselines. Additionally, we incorporate a stochastic process model to enhance interpretability, offering deeper insights into the relationship between temperature and model performance. Our code is available at https://github.com/StigLidu/dualdistill . Optimizing Temperature for Language Models with Multi-Sample Inference ing how to optimize the sampling process to enhance LLM performance under different conditions, including variations in training datasets, task types, and model sizes. A crucial open question is how to tune temperature, a key hyperparameter that controls the smoothness of the system-learned distribution. Intuitively, increasing the temperature leads to a smoother distribution, enhancing the diversity of sampled outputs. However, excessively high temperatures can introduce many low-quality samples, making aggregation more challenging (Holtzman et al., 2019; Renze & Guven, 2024) . Conversely, lowering the temperature results in a highly concentrated distribution, reducing diversity and potentially omitting high-quality samples. Striking the right balance between over-sampling and under-sampling is therefore essential for optimizing LLM performance. A common practice in prior evaluations is to use the same temperature across all methods despite variations in training datasets, task types, model sizes, and aggregation strategies. This practice is clearly suboptimal. An alternative approach is to empirically tune the temperature using labeled validation data for each task, dataset, model size, and aggregation strategy (Zhang et al., 2024a; Dhuliawala et al., 2024) . However, such a process is tedious and time-consuming and heavily dependent on the availability of labeled validation data, limiting its applicability when such data are scarce. In this paper, we present the first systematic investigation of how temperature affects LLM performance under multisample aggregation strategies across various conditions. Furthermore, we propose a principled algorithmic solution for automated temperature optimization without requiring labeled validation data. Our key idea is as follows: 1. We use the confidence score of each model as a selfassessment measure.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Tree of Thoughts: Deliberate Problem Solving with Large Language Models 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • Tree of Thoughts: Deliberate Problem Solving with Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Self-Consistency Improves Chain of Thought Reasoning in Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Chain-of-Thought Prompting Elicits Reasoning in Large Language Models 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • Self-Consistency Improves Chain of Thought Reasoning in Language Models 引用了 The Curious Case of Neural Text Degeneration
  • Temperature as a Meta-Policy: Adaptive Temperature in LLM Reinforcement Learning 引用了 The Curious Case of Neural Text Degeneration
  • Demystifying LLM-as-a-Judge: Analytically Tractable Model for Inference-Time Scaling 引用了 Tree of Thoughts: Deliberate Problem Solving with Large Language Models
  • Demystifying LLM-as-a-Judge: Analytically Tractable Model for Inference-Time Scaling 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • Demystifying LLM-as-a-Judge: Analytically Tractable Model for Inference-Time Scaling 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Optimal Self-Consistency for Efficient Reasoning with Large Language Models 引用了 Tree of Thoughts: Deliberate Problem Solving with Large Language Models
  • Optimal Self-Consistency for Efficient Reasoning with Large Language Models 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • Optimal Self-Consistency for Efficient Reasoning with Large Language Models 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
  • Optimal Self-Consistency for Efficient Reasoning with Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper11

  1. BroRL: Scaling Reinforcement Learning via Broadened ExplorationJian Hu, Mingjie Liu, Ximing Lu, Fang Wu 等ICML 2026 · 16 次引用
  2. Temperature as a Meta-Policy: Adaptive Temperature in LLM Reinforcement LearningHaoran Dang, Cuiling Lan, Hai Wan, Xibin Zhao 等ICLR 2026 · 9 次引用
  3. Optimal Self-Consistency for Efficient Reasoning with Large Language ModelsAustin Feng, Marius Alonso, Ambroise Odonnat, Vasilii Feofanov 等ICML 2026 · 6 次引用
  4. Large Language Models Develop Novel Social Biases Through Adaptive ExplorationAddison J. Wu, Ryan Liu, Xuechunzi Bai, Thomas GriffithsICML 2026 · 4 次引用
  5. Demystifying LLM-as-a-Judge: Analytically Tractable Model for Inference-Time ScalingIndranil Halder, Cengiz PehlevanICML 2026 · 4 次引用

它引用的 Paper14

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
  2. Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran 等NeurIPS 2023 · 5,068 次引用
  3. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes 等ICLR 2020 · 4,112 次引用
  4. Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng 等SOSP 2023 · 1,016 次引用
  5. Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le 等ICLR 2023 · 681 次引用

相关 Paper

  1. The Effect of Sampling Temperature on Problem Solving in Large Language ModelsMatthew RenzeEMNLP Findings 2024 · 212 次引用
  2. Thermometer of Thoughts: Enhancing LLM's Exploration via Attention Temperature ModulationZhiyuan Yu, Shijian Xiao, Cam-Tu Nguyen, Zhangyue Yin 等ACL 2026
  3. Self-Ensemble: Mitigating Confidence Distortion for Large Language ModelsZicheng Xu, Guanchu Wang, Guangyao Zheng, Yu-Neng Chuang 等EMNLP Findings 2025
  4. Future-Gain Guided Test-Time Learning for Large Language ModelsLangYu Bian, Jinwu Hu, Zitian Zhang, Dongjin Yang 等ICML 2026 · 12 次引用
  5. SelectLLM: Query-Aware Efficient Selection Algorithm for Large Language ModelsKaushal Kumar Maurya, KV Aditya Srivatsa, Ekaterina KochmarACL Findings 2025 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖