arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.05234cs.LGcs.AIcs.CL
收藏

基于多样本推理的语言模型温度优化

Optimizing Temperature for Language Models with Multi-Sample Inference

Language Technologies Institute, Carnegie Mellon University(卡内基梅隆大学语言技术研究所)

Weihua Du, Yiming Yang, Sean Welleck

AI总结:

针对大语言模型多样本聚合中温度选择依赖固定值或稀缺标注验证数据的问题,提出基于熵的新型自动化温度优化指标,性能优于固定温度基线,并引入随机过程模型增强可解释性。

摘要:

多样本聚合策略(如多数投票、best-of-N采样)被广泛用于当代大语言模型(LLM),以提升各类任务的预测准确率。该过程的核心挑战是温度选择,它对模型性能有显著影响。现有方法要么依赖固定默认温度,要么需要有标注的验证数据进行调优,而这类数据通常稀缺且难以获取。本文针对无需任务特定验证数据、为不同LLM自动找到(近)最优温度的挑战展开研究,采用多样本聚合策略。我们全面分析了温度在性能优化中的作用,考虑了模型架构、数据集、任务类型、模型规模与预测准确率的差异。此外,我们提出了一种基于熵的新型自动化温度优化指标,其性能始终优于固定温度基线。我们还引入了一个随机过程模型以提升可解释性,为温度与模型性能的关系提供了更深入的见解。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑