无需标注数据,自动优化大模型采样温度以提升准确率
Optimizing Temperature for Language Models with Multi-Sample Inference
- 用熵值指标自动找最佳采样温度
- 在多个模型和任务上表现优于固定温度
- 适合无标签数据时的模型调优场景
多样本聚合策略(如多数投票、Best-of-N)广泛应用于当前大语言模型中,以提升各类任务的预测准确性。温度选择是该过程中的关键挑战,现有方法或依赖固定默认值,或需任务特定标注验证数据,但后者常稀缺难获。本文提出一种无需任务标注数据的自动化温度优化方法,针对不同大模型使用多样本聚合策略,实现近似最优温度选择。通过全面分析温度在模型架构、数据集、任务类型、模型规模及预测精度上的影响,提出基于熵的新型优化指标,性能持续优于固定温度基线。同时引入随机过程模型增强可解释性,深化对温度与模型表现关系的理解。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。