EDT: Improving Large Language Models' Generation by Entropy-based Dynamic Temperature Sampling

Shimao Zhang, Yu Bao, Shujian Huang
3/21/2024
cs.CL

No official code found. Best implementation: hiyouga/LlamaFactory (72,841 stars, Apache-2.0, last commit 2026-04-29).

Abstract

Recently, Large Language Models (LLMs) have demonstrated outstanding performance across a wide range of downstream language tasks. Temperature sampling is a commonly used decoding strategy for LLMs' generation process. However, a fixed temperature parameter is used in most cases, which may not always be an optimal choice for balancing generation quality and diversity. In this paper, we propose an effective Entropy-based Dynamic Temperature (EDT) Sampling method, to achieve a more balanced performance in terms of both generation quality and diversity by dynamically selecting the temperature parameter. Additionally, we also show model performance and comprehensive analyses for 4 different generation benchmarks. Our experiments show that EDT significantly outperforms the existing strategies across different tasks.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Unified Efficient Fine-Tuning of 100+ LLMs & VLMs (ACL 2024)

72,8418,898Python, MakefileMay 28, 20235 months agoApache-2.0
agentaideepseekfine-tuninggemma+15 more

Similar Papers

Cite this paper

@article{zhang2024edt,
  title  = {EDT: Improving Large Language Models' Generation by Entropy-based Dynamic Temperature Sampling},
  author = {Shimao Zhang and Yu Bao and Shujian Huang},
  year   = {2024},
  eprint = {2403.14541},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.14541v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.14541.svg)](https://codeofpaper.com/paper/2403.14541)

Discussion