Turning Up the Heat: Min-p Sampling for Creative and Coherent LLM Outputs

๐Ÿ“… 2024-07-01
๐Ÿ“ˆ Citations: 8
โœจ Influential: 1
๐Ÿ“„ PDF
๐Ÿค– AI Summary
To address the imbalance between generation quality and diversity in large language models (LLMs) under high-temperature sampling, this paper introduces *min-p* samplingโ€”a novel token selection strategy that adaptively scales the probability threshold as *p*ยทmax(*P*), dynamically discarding tokens whose probabilities fall below this threshold. Unlike conventional top-*p* (nucleus) sampling, which suffers from instability at elevated temperatures, *min-p* preserves textual coherence while enhancing creative diversity. Empirical evaluation on benchmarks including GPQA, GSM8K, and AlpacaEval demonstrates substantial improvements in both reasoning and open-ended generation performance. Human evaluations further confirm statistically significant gains in preference scores. The method has been adopted by multiple mainstream open-source LLM projects, establishing a new paradigm for controllable text generation that balances fidelity, fluency, and novelty without requiring architectural modifications or additional training.

Technology Category

Application Category

๐Ÿ“ Abstract
Large Language Models (LLMs) generate text by sampling the next token from a probability distribution over the vocabulary at each decoding step. However, popular sampling methods like top-p (nucleus sampling) often struggle to balance quality and diversity, especially at higher temperatures, leading to incoherent or repetitive outputs. To address this challenge, we propose min-p sampling, a dynamic truncation method that adjusts the sampling threshold based on the model's confidence by scaling according to the top token's probability. We conduct extensive experiments on benchmarks including GPQA, GSM8K, and AlpacaEval Creative Writing, demonstrating that min-p sampling improves both the quality and diversity of generated text, particularly at high temperatures. Moreover, human evaluations reveal a clear preference for min-p sampling in terms of both text quality and diversity. Min-p sampling has been adopted by multiple open-source LLM implementations, highlighting its practical utility and potential impact.
Problem

Research questions and friction points this paper is trying to address.

Balancing text quality and diversity in LLM outputs
Addressing incoherent or repetitive outputs at high temperatures
Improving creative and coherent text generation with min-p sampling
Innovation

Methods, ideas, or system contributions that make the work stand out.

Min-p sampling adjusts threshold dynamically
Improves text quality and diversity
Adopted by multiple LLM implementations
๐Ÿ”Ž Similar Papers
No similar papers found.